Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Private members in Switch used in Paint
Private members in Switch used in Paint [message #9306] Thu, 26 April 2007 13:04 Go to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I need to overload the Paint method of the Switch ctrl to add some extra behaviour, but this is impossible because it uses some members that are declared as 'private'.

The offending members are:
	int          pushindex;
        [...]
	Vector<int>  posx;
	int          linecy;
	int          light;

I can see why these are private, but is there anything that can be done? IMO it is quite important that a Ctrl's Paint method is reproducable by sub-classes since it is quite commonly changed (at least by me Smile), and the only other solution is to copy the whole class.

Cheers,
James
Re: Private members in Switch used in Paint [message #9308 is a reply to message #9306] Thu, 26 April 2007 13:39 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mrjt wrote on Thu, 26 April 2007 07:04

I need to overload the Paint method of the Switch ctrl to add some extra behaviour, but this is impossible because it uses some members that are declared as 'private'.

The offending members are:
	int          pushindex;
        [...]
	Vector<int>  posx;
	int          linecy;
	int          light;

I can see why these are private, but is there anything that can be done? IMO it is quite important that a Ctrl's Paint method is reproducable by sub-classes since it is quite commonly changed (at least by me Smile), and the only other solution is to copy the whole class.

Cheers,
James


We have discussed this some time ago... I do not think that everything should be accessible. The trouble is that these things are implementation and implementation can change, breaking (potentially) a lot of code.

Instead, if there is something missing in Switch, suggest improvements. Or maybe copy the class as you suggest and later we can merge them back.

Mirek
Previous Topic: HasFocus and popup widnows
Next Topic: how to force ImageView snippet to update in RT
Goto Forum:
  


Current Time: Mon Apr 29 05:46:25 CEST 2024

Total time taken to generate the page: 0.03539 seconds