Controls and TWEAK_WineLook

Andrew McCall amccall2 at yahoo.com
Tue Feb 19 13:42:38 CST 2002


Now that the license discussion is dying down a bit...

I've been working on porting a couple of aps in house 
via WineLib over the past couple of days.  While in
general it's been great, I've decided that I would
like these applications to have a more linuxy type
of look and feel. (As well as other programs I run via

Wine.)

I started to look at the controls implementation 
in WineLib. (I'm a very newbie Wine Hacker here, so
I had to do a bit of searching...) I've been working 
with the control code in wine/controls.

Now, just to be sure that I'm looking at this the
right 
way:

It appears that the Win31 look is implemented in 
general, inside the drawcode for each control, while
the WinME/NT look is implemented mostly in uitools.c.
Is this correct?

I've started small trying to change some of the L&F 
behavoir of the push buttons. (Doing simple things
like creating rounded edges/etc...)  I've come to a
couple of conclusions while trying to do this. 

I think it might be a good idea to try to
move more of the Win31 look inside of the 
DrawFrameControl function.  Is there something I'm
missing as to why this hasn't been done already? 

I have considered a few options for my app: the first
being to implement the new look just as the Win31
look is implemented now. I dislike this because of
the added complexity it would give the already complex
button/control code.  The best method that I currently
see is to modify the DrawFrameControl code to be 
friendly toward adding different looks. A benefit
of this approach is that it would allow much of the
Win31 look code to be moved into the DrawFrameControl
function, allowing aps using that function call to
keep a similar look throughout.

I believe this could be done by adding a swtich
statement or using function pointers in the current
DrawFrameControl and then reimplementing each of
the relevant functions for my wanted new look. 

Perhaps each of the new sets of UITOOLSXX functions
could be moved into a different file. (Win31UITOOLS,
LinuxUITools, Win95UITools.)

If noone else is working on this code, I'd like to
see what I could do with it... It think it's a fairly
nice place to start in Winehacking.

Is there a codestyle guide FAQ around that I could 
look at?

=====
----

Andrew McCall - andrew at nrrds.com

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com




More information about the wine-devel mailing list