XP dialogs


Subject: XP dialogs
From: Mike Nordell (tamlin@algonet.se)
Date: Sat Feb 10 2001 - 10:19:53 CST


Adding some XP thoughts to the libglade fuel. ;->

I've since I first lay my eyes on our dialog code had a firm belief that all
dialogs should really be in XP code and XAP code should provide the adaption
needed to get them to work on each our platforms.

I've mentioned before that I think that currently there's hardly any, if any
at all, hope that we will ever support a new platform since it would be a
too daunting task to create all dialogs *once again* for a new platform
(i.e. we're wasting time doing this over and over, and over again). We also
have a maintenance nightmare that if any dialog gets changed for one
platform we have to (currently) change it three times more for the other
ones.

Which bring me to the issue, what your opinions are re. creating dialog
controls. Please try to think what you would _like_ to have, not what you
think is possible on your current platform or in your current
library/framework (unless of course there is some issue that's you _know_ is
impossible with that framework/library/window-manager/...).

Should controls be manually created like

  m_button.Create(x,y, ...)

note that this doesn't rule out some kind of automatic control mover/resizer
(think resizable dialogs), like

  m_b1_resizer(align_left, align_top, align_right, align_size,
Rect(10,10,-30,20));
  m_button1.create(m_bi_resizer, ...)

to create a button going from (10,10)-(dlg_right_edge - 30, 30). I've used
this myself with quite satisfactory results.

Should there perhaps be some kind of tabular layouter, something like:

  m_dlg.add(m_vert_lay1);
  m_dlg.add(m_vert_lay2);
  m_vert_lay1.create(2 /* rows */);
  m_vert_lay2.create(3 /* rows */);
  m_vert_lay1.add(m_horz1);
  m_horz_lay1.add(text, "hello:");
  m_vert_lay2.add(m_list_box);

or would you like to see something I haven't mentioned here?

Your input would be appreciated.

/Mike



This archive was generated by hypermail 2b25 : Sat Feb 10 2001 - 10:20:04 CST