gnumed-devel
[Top][All Lists]
Advanced

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

[Gnumed-devel] switchable layout managers


From: Ian Haywood
Subject: [Gnumed-devel] switchable layout managers
Date: Fri, 16 Jul 2004 10:05:25 +1000

[I am moving this thread to the public list.
Background: once again, we are discussing layout (guess who started it)
We (Karsten and I) have accepted that layout should be done with 
a dedicated layout class ("inner frame") loaded from gmGuiMain (which still 
controls the outer
frame and the top toolbars) ]

On Fri, 16 Jul 2004 01:11:35 +0200
Karsten Hilbert <address@hidden> wrote:

> I would think the inner frame should act "completely within
> it's own realm". What I find strange is how you were trying to
> reuse the Horst-Notebook *plugins* *inside* the
> Terry-Splitscreen manager. No question the *widget code*
> should be reused where appropriate, but not the notebook
> plugin wrappers. Earlier we reused plugin infrastructure code
> across layout managers and found it to be messy. Now, we want
> to reuse actual plugin code across layout managers ? I fear
> that's not really less messy than before. The *widgets* in
> client/wxpython/*.py should be written to care less where they
> are instantiated and used but the layout manager specific
> plugin wrappers in, say, client/wxpython/gui/*.py are just
> that - layout manager specific. (it should be named
> client/wxpython/Herb-GUI/ though)
> 
> Ideas on how to proceed ?
Well, do we really need plugin wrappers at all?
All the layout managers need is a list of widget classes to load.
The tab label can be inferred from __class__.__name__
so if asked to load  Gnumed.wxpython.gmContactsWidget.Contacts
we know to call it "Contacts". "_" should be mapped to space,
so we have Gnumed.wxpython.gmDemographics.Patient_Details
These still behave as "plugins" in that someone can write a single file which 
can be 
dropped into the tree and will work as a loadable module.


The Terry layout would look under client/bitmaps to see if an icon exists
of the same name, if it does, fine, if not use the label as above.

For placement the Terry widget may have two lists on the configuration backend 
(one for the notebook,
one for the sidebar) or it could examine the widgets ancestry (if it descends 
from gmSidebarWidget, it goes in the 
sidebar)

This would end the practice of loading every widget in the directory, instead a 
default list (for the locale)
would be preloaded in the backend This is good as we can purposely leave broken 
widgets off the list, until
they get fixed.

Ian  

-- 
PGP public key E750652E at wwwkeys.pgp.net
9BF0 67B7 F84F F7EE 0C42  C063 28FC BC52 E750 652E

Attachment: pgpY4NKTued7y.pgp
Description: PGP signature


reply via email to

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