#define VBInteger(name,title,length)\
                      HGroup,\
                        Child, Label(title),\
                        Child, name = StringObject,\
                          StringFrame,\
                          MUIA_String_Contents, "",\
                          MUIA_String_MaxLen, length,\
                          MUIA_String_Integer, TRUE,\
                        End,\
                      End  

#define VBBoolean(name,title)\
                      HGroup,\
                        Child, Label(title),\
                        Child, name = Cycle(bool),\
                      End  

#define VBString(name,title,length)\
                      HGroup,\
                        Child, Label(title),\
                        Child, name = String("",length),\
                      End  

#define VBPopMenu(name,title)\
                      HGroup,\
                        Child, Label(title),\
                        Child, name = SimpleButton("x"),\
                      End  

#define VBPopList(name,title)\
                      HGroup,\
                        Child, Label(title),\
                        Child, name = PopobjectObject,\
                          MUIA_Popstring_String, String("nothing",60),\
                          MUIA_Popstring_Button, PopButton(MUII_ArrowDown),\
                          MUIA_Popobject_StrObjHook, &StrObjHook,\
                          MUIA_Popobject_ObjStrHook, &ObjStrHook,\
                          MUIA_Popobject_Object, ListviewObject,\
                            MUIA_Listview_List, ListObject,\
                              InputListFrame,\
                              MUIA_List_Format,"COL=0 BAR,COL=1",\
                              MUIA_List_ConstructHook, &ConstructHook,\
                              MUIA_List_DestructHook, &DestructHook,\
                              MUIA_List_DisplayHook, &DisplayHook,\
                            End,\
                          End,\
                        End,\
                      End
                      
Object *BuildObjWin(void)
{
  static const char *proppages[] = { "Properties","Code", NULL };
  static const char *bool[] = {"False","True",NULL};

  return(WindowObject,
    MUIA_Window_Title, "Objects",
    MUIA_Window_ID, MAKE_ID('O','B','J','S'),
    MUIA_HelpNode, "WI_OBJECTS",
    WindowContents, VGroup,
      Child, HGroup,
        Child, VGroup,
          Child, VBPopList(a->ObjListPop,"Name:"),
          Child, HGroup,
            Child, LLabel("Type: "),
            Child, TextObject,
              MUIA_Text_Contents, "objecttype",
              MUIA_Text_SetMax, FALSE,
              MUIA_Text_SetMin, FALSE,
            End,
          End,
        End,
      End, 
      Child, RegisterGroup(proppages),
        Child, VGroup,
          MUIA_HelpNode, "PROPERTIES",
          Child, a->ApplyChanges = SimpleButton("Apply changes"),
          Child, ScrollgroupObject,
            MUIA_Scrollgroup_FreeHoriz, FALSE,
            MUIA_Scrollgroup_Contents,
            VGroupV, VirtualFrame,
              Child, VBPopList(a->BackGround,       "BackGround*   "),
              Child, VBPopMenu(a->ContextMenu,      "ContextMenu*  "),
              Child, VBString(a->ControlChar,       "ControlChar*  ",2),
              Child, VBBoolean(a->CycleChain,       "CycleChain*   "),
              Child, VBBoolean(a->Disabled,         "Disabled*     "),
              Child, VBBoolean(a->Draggable,        "Draggable*    "),
              Child, VBBoolean(a->Dropable,         "Dropable*     "),
              Child, VBPopList(a->Font,             "Font*         "),
              Child, VBPopList(a->Frame,            "Frame*        "),
              Child, VBBoolean(a->FramePhantomHoriz,"FramePhantomHoriz*"),
              Child, VBString(a->FrameTitle,        "FrameTitle*   ",30),
              Child, VBInteger(a->HelpLine,         "HelpLine*     ",4),
              Child, VBString(a->HelpNode,          "HelpNode      ",30),
              Child, VBBoolean(a->HorizDisappear,   "HorizDisappear"),
              Child, VBInteger(a->HorizWeight,      "HorizWeight   ",4),
              Child, VBInteger(a->InnerBottom,      "Innerbottom   ",4),
              Child, VBInteger(a->InnerLeft,        "InnerLeft     ",4),
              Child, VBInteger(a->InnerRight,       "InnerRight    ",4),
              Child, VBInteger(a->InnerTop,         "InnerTop      ",4),
              Child, VBPopList(a->InputMode,        "InputMode     "),
              Child, VBInteger(a->MaxHeigth,        "MaxHeigth     ",4),
              Child, VBInteger(a->MaxWidth,         "MaxWidth      ",4),
              Child, VBString(a->ObjectID,          "ObjectID*     ",30),
              Child, VBBoolean(a->Selected,         "Selected*     "),
              Child, VBString(a->ShortHelp,         "ShortHelp     ",30),
              Child, VBBoolean(a->ShowMe,           "ShowMe        "),
              Child, VBBoolean(a->ShowSelState,     "ShowSelState  "),
              Child, VBBoolean(a->VertDisappear,    "VertDisappear "),
              Child, VBInteger(a->VertWeight,       "VertWeight    ",3),
              Child, VBInteger(a->Weight,           "Weight        ",3),
            End,  
          End,
        End,
        Child, VGroup,
          MUIA_HelpNode, "CODE",
          Child, HGroup,
            Child, Label("Event: "),
            Child, Cycle(entries),
          End,
          Child, ListviewObject,
            MUIA_Listview_Input, TRUE,
            MUIA_Listview_List, ListObject,
            InputListFrame, End,
          End,
        End,
      End,
    End,
  End);
}
