Re: Discussion - how do you GUI?

new topic     » goto parent     » topic index » view thread      » older message » newer message
ryanj said...

..

I'm trying to figure out how to improve the overall design RedyCode IDE and Redylib API to work well with common scenarios.


Here are some questions for euphoria programmers, to hopefully spark some discussion:

What do you use GUI programming for? Do you usually create some sort of file editor/viewer? Or database front end? Or just a few simple controls to process or view some data? Do you have a single view? or tabs with multiple views or different types of views? Do you have multiple windows or a single main window? What types of controls, editors, or viewers do you use? or wish were available? What graphics features are important? Do you make custom graphics or controls or just use whatever widgets/controls are available? Do you separate GUI from non-GUI code? What methods do you use to keep your code well-structured? Are there some things that you wish were easier to do when designing a GUI? What problems have you faced when designing a GUI? What solutions or work-arounds did you have to come with? Is there a particular GUI library that works well for you?

I make GUI programs for my work and at home for various projects. For work the tasks are mainly conversion that take some type of data and process it to produce another form. I generally break up the task into these common discrete phases:

1 Load data into a form for viewing 2 Check/augment the data 3 Output the data to destination

I try to make the programs as simple as possible since my users are non-technical. Windows are kept to a minimum. Listviews are used a LOT for viewing the kinds of data we deal with. A common control theme I use is to have a tab control sitting on the main window with each functional module sitting self-contained inside its own tab. Each tab/module has its own include file to keep the code structure intuitive. For work the only graphics I (currently) need are for dollying up pushbuttons. However, I have had to use my own 2d graphics library in the past to create a document previewer. I manually (or copy n paste) create each form in my IDE (which is really just a glorified text editor). One thing that would help the form design phase is to have a proper GUI designer. For my home projects I use the graphics library a lot in GUI programs.

As an aside, you mention support for 16 x 16 icons. As you know, Windows has different formats for different types of graphics (icons, cursors, bitmaps, dibsections). This has been such an annoyance for me that I ignored adding support for these things directly into my win32 library. I think it'd be better to have one format that can be manipulated by the one graphics library. This would imply creating certain controls as custom controls. For instance, instead of having a PushButton and a PictureButton, why not just have a Button that can have both an image and/or text on the face? Another annoyance to do with graphics is the sizing issue. Your 16x16 icons become too small at certain resolutions. But is the way to solve this to create a set of icon images at different resolutions? A smart graphics library should be able to resize (a copy of) the icon to the desired resolution without amplifying jaggies. Using similar logic the same icon could serve as the basis of a disabled version. I do this with my custom HotButton controls. Only one icon is associated with the control. When the button state changes a new image is made, based on that one icon. I don't have to manually create a set of images beforehand to reflect the different button states.

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu