Re: preferred graphical designer for gnome?



On Tue, Mar 02, 1999 at 05:10:05PM -0400, Aldy Hernandez wrote:
> 
>  > I also use glade to give me a general idea of how a layout will look, then I
>  > wander off and write it by hand. (Generated code is icky)
> 
> Hmmmm... I'm getting the feeling I'm going to continue hacking things
> by hand.  I just really hate having a myraid of v/hboxes lying
> around.

Yes, this is quite unreadable for anything apart from the hello world
examples.  MUI for AmigaOS had basically the same concept (C based
object oriented widget toolkit; the OOP framework was provided by
AmigaOS with BOOPSI).

Objects were all initialized with arg lists (TagLists, also an OS
service, consisting of 32bit ID/32bit value pairs).  Container childs
could be given as args.  #defines were used quite extensively for all
IDs and in MUI also for object creation (e.g. VGroup expands to
'MUI_NewObject(MUIC_VGroup' and End expands to ')').  Given that the
code to create a complete window could look like that:

window.window = WindowObject,
    MUIA_Window_ID,             MAKE_ID('M','A','I','N'),
    MUIA_Window_Title,          ifname,
    MUIA_Window_Menustrip,      MUI_MakeObject(MUIO_MenustripNM,nm,0),
    MUIA_Window_SizeRight,      TRUE,

    WindowContents, window.group = VGroup,
        Child, window.numbergroup.group = HGroup,
            Child, VGroup,
                Child, Label1("Inbound:"),
                Child, Label1("Outbound:"),
                End,
            Child, VGroup,
                Child, window.numbergroup.in = MUI_NewObjectA(MUIC_Text,stdtexttags),
                Child, window.numbergroup.out = MUI_NewObjectA(MUIC_Text,stdtexttags),
                End,
            Child, window.numbergroup.avglabelsgroup = VGroup,
                Child, Label1("avg:"),
                Child, Label1("avg:"),
                End,
            Child, window.numbergroup.avggroup = VGroup,
                Child, window.numbergroup.inavg = MUI_NewObjectA(MUIC_Text,stdtexttags),
                Child, window.numbergroup.outavg = MUI_NewObjectA(MUIC_Text,stdtexttags),
                End,                            
            Child, window.numbergroup.resetgroup = VGroup,
                MUIA_Weight, 0,
                Child, window.numbergroup.resetinb = MUI_MakeObject(MUIO_Button,"R"),
                Child, window.numbergroup.resetoutb = MUI_MakeObject(MUIO_Button,"R"),
                End,
            Child, window.numbergroup.addlabelsgroup = VGroup,
                Child, Label1("all:"),
                Child, Label1("all:"),
                End,
            Child, window.numbergroup.addgroup = VGroup,
                MUIA_Weight, 140,
                Child, window.numbergroup.inadd = MUI_NewObjectA(MUIC_Text,widetexttags),
                Child, window.numbergroup.outadd = MUI_NewObjectA(MUIC_Text,widetexttags),
                End,
            Child, window.numbergroup.resetallgroup = VGroup,
                MUIA_Weight, 0,
                Child, window.numbergroup.resetinallb = MUI_MakeObject(MUIO_Button,"R"),
                Child, window.numbergroup.resetoutallb = MUI_MakeObject(MUIO_Button,"R"),
                End,
            End,
        Child, window.buttongroup.group = VGroup,
            Child, window.buttongroup.hbar = MUI_MakeObject(MUIO_HBar,2),
            Child, window.buttongroup.resetbutton = MUI_MakeObject(MUIO_Button,"_Reset All"),
            End,
        End,
    End;


-- 
Andreas E. Bombe <andreas.bombe@munich.netsurf.de>
http://home.pages.de/~andreas.bombe/



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