gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppKit (Win32) generals questions


From: Richard Frith-Macdonald
Subject: Re: AppKit (Win32) generals questions
Date: Fri, 9 May 2008 09:40:55 +0100


On 9 May 2008, at 08:28, Thierry DELHAISE wrote:

Hi Fred and others

Thx for your precisions : that help a lot !

I came back with my original question and will try to precise what I want to do, and how, I understood, I must do the job with gnustep to fit in the Framework.

I want to use the low level GetOpenFileName on Windows. This function take a big C structure to allow it to get all informations to configure the dialog box and the feature that will be display to user to allow him/her to choose a file name.

So in GNUstep way, I use NSOpenPanel, later the theme Framework detect that this is a NSOpenPanel and the theme Framework call the appropriate (and specifique win32) DisplayServer (win32) code whitch call the OS GetOpenFileName. Does it is the trick ?

The scheme should be the same for PrintDialog, Color dialog, Fonts dialog, etc....

Well, when adding this sort of functionality you would first need to decide whether you want to use these high level win32 functions at all ... Just using the existing code in the gui (and perhaps modifying it slightly) might be better in some/all cases: you would need to see what benefit is provided. The thing about using native controls in their entirety is that this involves changing the way things operate (the feel), not just their appearance, and one of the reasons for using GNUstep is that you believe the interface is better than alternatives such as ms-windows, so you want to be sure that the benefits of using the native controls outweigh the costs. Wherever there is any doubt, you would probably want your theme code to allow the user to use NSUserdefaults or some other mechanism to select whether they want the native control to be used or not. Currently the theme engine does not allow the entire functionality of these panels to be replaced (it's focussed on allowing you to draw controls in a themed way ... ie changing the appearance while maintaining the NeXTstep feel), but there's no reason that this capability can't be added.

Second question to all : where is the code for Theme Framework, does it is available in trunk,(gui ?) and how does it get called (I took a quick look yesterday at the NSWindow.m code and saw nothing about theme, but I m certainly wrong ...

It's GSTheme in the gui library. Currently only the bare bones are available, and most of the gui does not use it to draw (other than to determine the colors used to draw everything). What it allows you to do is dynamically change the current theme, with alternative color settings, alternative images, and other interface style settings, plus providing drawing methods which can let you draw controls by tiling theme specific image, or use alternative code from your subclass of GSTheme to draw the images.

See 
http://www.gnustep.org/resources/documentation/Developer/Gui/Additions/index.html
and also http://svn.gna.org/viewcvs/gnustep/apps/thematic/trunk/








reply via email to

[Prev in Thread] Current Thread [Next in Thread]