Mui structure question
  • Butterfly
    Butterfly
    rebraist
    Posts: 96 from 2011/4/6
    From: Naples, Italy
    I have this code taken from guru meditation net.

    I would like that the last two objects (simplebutton and stringframe) being on the same row. i read about the HGroup but i was no able to obtain anything. how can i modify it? Thank you

    app = ApplicationObject,
    MUIA_Application_Title , "Titre",
    MUIA_Application_Version , "$VER: 0.0.1 (05/06/04)",
    MUIA_Application_Copyright , "©2004, copyright et célébrité",
    MUIA_Application_Author , "L'auteur, c'est vous !",
    MUIA_Application_Description, "Description libre",
    MUIA_Application_Base , "DISKO",

    SubWindow, window = WindowObject,
    MUIA_Window_Title, "Projet DisKo : Premier programme MUI",
    MUIA_Window_ID , MAKE_ID('W','I','N','1'),
    WindowContents, VGroup,

    Child, TextObject, TextFrame,
    MUIA_Background, MUII_TextBack,
    MUIA_Text_Contents, "\33c Il affiche ici du texte multiligne
    dans un TextObject\navec une frame \33bTextFrame\33n",
    End,

    Child, TextObject, ButtonFrame,
    MUIA_Background, MUII_TextBack,
    MUIA_Text_Contents, "\33c Et ici un TextObject avec une frame
    d'aspect \33iButtonFrame\33n\nce qui lui donne son aspect de bouton",
    End,

    Child, TextObject, StringFrame,
    MUIA_Background, MUII_TextBack,
    MUIA_Text_Contents, "\33c Et un dernier avec \33uStringFrame\33n\n
    (Escape pour quitter l'application)",
    End,

    Child, SimpleButton("Bouton sans action"),

    End,
    End,
    End;



    [ Edited by rebraist 07.04.2011 - 14:16 ]
    Mac Mini g4 1,5 mos 3.1 registered
    Powerbook g4 1,67 mos 3.1 unregistered
    Sam440 Os4.1.6
    Aros-Aros-Aros.
  • »07.04.11 - 13:14
    Profile
  • Moderator
    Kronos
    Posts: 2240 from 2003/2/24
    Child, HGroup,
    Child, TextObject, ButtonFrame,
    MUIA_Background, MUII_TextBack,
    MUIA_Text_Contents, "\33c Et ici un TextObject avec une frame
    d'aspect \33iButtonFrame\33n\nce qui lui donne son aspect de bouton",
    End,

    Child, TextObject, StringFrame,
    MUIA_Background, MUII_TextBack,
    MUIA_Text_Contents, "\33c Et un dernier avec \33uStringFrame\33n\n
    (Escape pour quitter l'application)",
    End,

    Child, SimpleButton("Bouton sans action"),

    End,
    End,
    End,
    End;

    Don't forget the extra "End,".

    Intention is way important when writing such long MUI-macros or you'll soon loose track into which group which objects falls.
  • »07.04.11 - 14:59
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    @Kronos: "intention" ? :-D

    @rebraist: so yes, encapsulate two last children by this:

    Child, HGroup,

    (...)

    End,

    Important for MUI dev: The 'End' is not needed because there is a 'Child', but because there is a 'HGroup'.
    As we can see, there is a 'Child' before SimpleButton without the need of a 'End'. Because SimpleButton is a closed macro, HGroup not




    [ Edited by Yomgui 07.04.2011 - 16:27 ]
    And now... next project!
  • »07.04.11 - 15:25
    Profile Visit Website
  • Butterfly
    Butterfly
    rebraist
    Posts: 96 from 2011/4/6
    From: Naples, Italy
    Thank you!
    Let's see if i've understood:
    i have to close with an end every "object" described by tag list.
    1) app
    2) window
    3) groups
    4) gadgets

    Some macros don't need end because they "close" in them the tags needed.
    Mac Mini g4 1,5 mos 3.1 registered
    Powerbook g4 1,67 mos 3.1 unregistered
    Sam440 Os4.1.6
    Aros-Aros-Aros.
  • »07.04.11 - 22:41
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    That's why I never use these messy macros... ;-)
  • »08.04.11 - 05:14
    Profile Visit Website
  • Butterfly
    Butterfly
    rebraist
    Posts: 96 from 2011/4/6
    From: Naples, Italy
    :)
    Where can i find the list of all available "gadget" usbale with mui?
    I looked the autodocs but it only talks about the attributes of those objects (MUIA)
    Surely i don't know how to use properly an autodoc but i don't find both objects or methods.
    Mac Mini g4 1,5 mos 3.1 registered
    Powerbook g4 1,67 mos 3.1 unregistered
    Sam440 Os4.1.6
    Aros-Aros-Aros.
  • »08.04.11 - 12:23
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2985 from 2003/3/5
    From: Canada
    The SDK comes with AGuide formatted MUI classes docs, listing all included .mui and .mcc classes.

    SDK:Guide/Magic_User_Interface has all the info you need. There's also the inheritance structure described in mui.h for its built in classes.

    [ Edited by jacadcaps 08.04.2011 - 13:42 ]
  • »08.04.11 - 12:40
    Profile Visit Website
  • Butterfly
    Butterfly
    rebraist
    Posts: 96 from 2011/4/6
    From: Naples, Italy
    thank you! i'm so excited because today have obtained a vgroup nested in a hgroup. I know it's a simple thing but for me it's a great goal!! :-P
    Mac Mini g4 1,5 mos 3.1 registered
    Powerbook g4 1,67 mos 3.1 unregistered
    Sam440 Os4.1.6
    Aros-Aros-Aros.
  • »08.04.11 - 13:20
    Profile