Home » Developing U++ » U++ Developers corner » Graduation thesis - Camouflage - a replacement of(a part of) Chameleon
Re: Graduation thesis - Camouflage - a replacement of(a part of) Chameleon [message #23665 is a reply to message #23664] |
Wed, 11 November 2009 19:08   |
andrei_natanael
Messages: 262 Registered: January 2009
|
Experienced Member |
|
|
Here is a possible implementation, a bit inspired from Qt, but in essence it's different than QStyle because it doesn't draw entire widgets as qt does, but parts and these parts will be drawn to ChStyle structure and Upp Controls are free to use them as wanted.
enum Control {
PushButton,
RadioButton,
DropList,
...
};
enum State {
Normal,
Default,
Pressed,
Focused,
Hot, // MouseOver
Disabled
};
enum SysInfo
{
HaveAnimations,
AnimationTime,
Composited,
//...
};
enum PixelMetric
{
PushButtonMargin,
PushButtonDefaultHeight, // MacOSX...
//...
};
class Camo
{
public:
void drawControl(Draw& w, Control c , State s, Rect bounds, Rect clip);
int pixelMetric(PixelMetric pm);
int getInfo(SysInfo);
Color getColor(Control c, State s, ... );
// ....
// ....
};
// CamoWin.cpp , CamoGtk.cpp, CamoMacOS.cpp, CamoUpp.cpp ,etc.
|
|
|
Goto Forum:
Current Time: Sun Jul 06 05:18:35 CEST 2025
Total time taken to generate the page: 0.02930 seconds
|