I want to realize a sort of navigation panel as follow
Three rows with 3 button each, inside a BVS_Group. The following is my attempt to make it. It consider only 4 buttons atm. The first three buttons are ok, but the fourth button is showed on the first row too
Code: Select all
f ((winobj = IIntuition->NewObject (WindowClass,NULL,
WA_PubScreen, scr,
//WA_Title, iwt,
WA_Flags, WFLG_ACTIVATE,
WA_IDCMP, IDCMP_VANILLAKEY | IDCMP_INTUITICKS,
WA_Width, scr->Width * 4/ 10,
WA_Height, 390,
WA_Top, 720,
WA_Left,1400,
WINDOW_NewMenu,newmenu,
WINDOW_BackFillName, "Sys:Prefs/Presets/Patterns/Chalk/ChalkBlue.brush",
WINDOW_ParentGroup, IIntuition->NewObject (LayoutClass,NULL,
LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_AddChild, IIntuition->NewObject(LayoutClass, NULL,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ,
LAYOUT_Label, " N A V I G A T I O N ",
//LAYOUT_AddChild, /*LayoutObject,*/
// IIntuition->NewObject(NULL, "layout.gadget",
// LAYOUT_VertAlignment, LALIGN_CENTER,
// LAYOUT_HorizAlignment, LALIGN_CENTER,
LAYOUT_AddChild, IIntuition->NewObject (LayoutClass,NULL,
LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_AddChild, gadgets[OBJ_BUT1] = /*ButtonObject,*/
IIntuition->NewObject(NULL, "button.gadget",
GA_ID, OBJ_BUT1,
//GA_Left, 10,
//GA_Top, 10,
BUTTON_BevelStyle, BVS_NONE,
BUTTON_Transparent, TRUE,
BUTTON_RenderImage, gadgets[OBJ_BUT1_UNSEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/AUP.png",
BITMAP_DisabledSourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
BUTTON_SelectImage, gadgets[OBJ_BUT1_SEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
TAG_END),
LAYOUT_AddChild, gadgets[OBJ_BUT2] = /*ButtonObject,*/
IIntuition->NewObject(NULL, "button.gadget",
GA_ID, OBJ_BUT2,
BUTTON_BevelStyle, BVS_NONE,
BUTTON_Transparent, TRUE,
BUTTON_RenderImage, gadgets[OBJ_BUT2_UNSEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/AUP.png",
BITMAP_DisabledSourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
BUTTON_SelectImage, gadgets[OBJ_BUT2_SEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
TAG_END),
LAYOUT_AddChild, gadgets[OBJ_BUT3] = /*ButtonObject,*/
IIntuition->NewObject(NULL, "button.gadget",
GA_ID, OBJ_BUT3,
BUTTON_BevelStyle, BVS_NONE,
BUTTON_Transparent, TRUE,
BUTTON_RenderImage, gadgets[OBJ_BUT3_UNSEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/AUP.png",
BITMAP_DisabledSourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
BUTTON_SelectImage, gadgets[OBJ_BUT3_SEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
TAG_END),
TAG_END),
LAYOUT_AddChild, IIntuition->NewObject (LayoutClass,NULL,
LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_AddChild, gadgets[OBJ_BUT4] = /*ButtonObject,*/
IIntuition->NewObject(NULL, "button.gadget",
GA_ID, OBJ_BUT4,
BUTTON_BevelStyle, BVS_NONE,
BUTTON_Transparent, TRUE,
BUTTON_RenderImage, gadgets[OBJ_BUT4_UNSEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/AUP.png",
BITMAP_DisabledSourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
BUTTON_SelectImage, gadgets[OBJ_BUT4_SEL] = /*BitMapObject,*/
IIntuition->NewObject(NULL, "bitmap.image",
BITMAP_SourceFile, "images/Object1.png",
BITMAP_Screen, scr,
BITMAP_Masking, TRUE,
TAG_END),
TAG_END),
TAG_END),
TAG_END),
TAG_END),
TAG_END)));