Home » Community » U++ community news and announcements » Upp 2007.1beta2 released
Re: Upp 2007.1beta2 released [message #7837 is a reply to message #7827] |
Thu, 25 January 2007 12:10   |
guido
Messages: 169 Registered: April 2006
|
Experienced Member |
|
|
Quote: | The problem is that there is no function available to get that individual color in Gtk API - you have to retrieve the pointer to the whole structure. Current U++ is designed to avoid including any Gtk headers, so we have to recreate the structure (see CtrlLib/ChGtk.cpp, beginning of file... Sad ). If layout changes between Gtk versions, we are in trouble...
|
Tried to get the hang of it last night.
So I started to replace some pointer arithmetics with proper data structures, to make things a bit less obfuscated.
Didn't understand how you calculated the style offset, as the data we are interested in starts right at offset 0.
'Twas late at night. For lack of familiarity with the upp::Draw properties and chameleon properties (paper,face ...) I didn't get farther than this:
struct G_color { dword _; word r, g, b; };
enum { G_STATE_NORMAL, G_STATE_ACTIVE, G_STATE_PRELIGHT, G_STATE_SELECTED, G_STATE_INSENSITIVE };
// G_STATE_NORMAL -> CTRL_NORMAL
// G_STATE_PRELIGHT -> CTRL_HOT
// G_STATE_ACTIVE -> CTRL_PRESSED
// G_STATE_SELECTED -> ??
// G_STATE_INSENSITIVE -> CTRL_DISABLED
struct G_style {
G_Color fg[5];
G_Color bg[5];
G_Color light[5];
G_Color dark[5];
G_Color mid[5];
G_Color text[5];
G_Color base[5];
G_Color text_aa[5]; /* Halfway between text/base */
G_Color black;
G_Color white;
};
I concluded, if I knew how things mapped to upp, I could have done it. But I must have overlooked something, if you couldn't get it done, I suppose.
Guido
|
|
|
 |
|
Upp 2007.1beta2 released
By: unodgs on Tue, 23 January 2007 09:01
|
 |
|
Re: Upp 2007.1beta2 released
By: Ulti on Tue, 23 January 2007 16:28
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Wed, 24 January 2007 18:10
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Wed, 24 January 2007 21:20
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Wed, 24 January 2007 22:40
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Thu, 25 January 2007 00:20
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Thu, 25 January 2007 01:30
|
 |
|
Re: Upp 2007.1beta2 released
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Thu, 25 January 2007 11:42
|
 |
|
Re: Upp 2007.1beta2 released
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Thu, 25 January 2007 12:20
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Thu, 25 January 2007 12:10
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Thu, 25 January 2007 12:28
|
 |
|
Re: Upp 2007.1beta2 released
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Wed, 24 January 2007 23:56
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Thu, 25 January 2007 00:10
|
 |
|
Re: Upp 2007.1beta2 released
|
 |
|
Re: Upp 2007.1beta2 released
By: guido on Thu, 25 January 2007 11:55
|
 |
|
Re: Upp 2007.1beta2 released
|
 |
|
Re: Upp 2007.1beta2 released
By: lundman on Fri, 26 January 2007 02:32
|
 |
|
Re: Upp 2007.1beta2 released
By: piotr5 on Fri, 26 January 2007 11:09
|
 |
|
Re: Upp 2007.1beta2 released
By: lundman on Fri, 26 January 2007 13:20
|
 |
|
Re: Upp 2007.1beta2 released
By: piotr5 on Mon, 29 January 2007 11:15
|
 |
|
Re: Upp 2007.1beta2 released
By: paolo on Tue, 30 January 2007 22:19
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Wed, 31 January 2007 00:13
|
 |
|
Re: Upp 2007.1beta2 released
By: paolo on Wed, 31 January 2007 11:21
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Wed, 31 January 2007 13:29
|
 |
|
Re: Upp 2007.1beta2 released
By: paolo on Thu, 01 February 2007 02:41
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Thu, 01 February 2007 05:25
|
 |
|
Re: Upp 2007.1beta2 released
By: paolo on Thu, 01 February 2007 15:17
|
 |
|
Re: Upp 2007.1beta2 released
By: mirek on Thu, 01 February 2007 20:13
|
 |
|
Re: Upp 2007.1beta2 released
By: paolo on Thu, 01 February 2007 22:17
|
 |
|
Re: Upp 2007.1beta2 released
By: paolo on Fri, 02 February 2007 12:23
|
Goto Forum:
Current Time: Fri Jun 27 12:58:30 CEST 2025
Total time taken to generate the page: 0.02901 seconds
|