Adding a toolbar of AISS icons

15 posts / 0 new
Last post
djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
Adding a toolbar of AISS icons

Hi,

I am trying to add a toolbar to the below program, the program started as clicktabexample.c and I am trying to add in functionality from imagebut.c.

I didn't get that far, can someone take a look at it please and post back.

Cheers

  1. /*
  2. ************************************************************
  3. **
  4. ** Created by: CodeBench 0.13 (16.02.2010)
  5. **
  6. ** Project: Smile
  7. **
  8. ** File:
  9. **
  10. ** Date: 04-04-2011 20:32:08
  11. **
  12. ************************************************************
  13. */
  14.  
  15. #include <dos/dos.h>
  16. #include <exec/exec.h>
  17. #include <intuition/intuition.h>
  18. #include <classes/window.h>
  19.  
  20. #include <images/bitmap.h>
  21.  
  22. #include <gadgets/layout.h>
  23. #include <gadgets/clicktab.h>
  24. #include <gadgets/button.h>
  25.  
  26. #include <proto/exec.h>
  27. #include <proto/intuition.h>
  28. #include <proto/window.h>
  29. #include <proto/layout.h>
  30. #include <proto/clicktab.h>
  31. #include <proto/bitmap.h>
  32.  
  33. #include <reaction/reaction_macros.h>
  34.  
  35.  
  36. #define OBJ(x) Objects[x]
  37. #define GAD(x) (struct Gadget *)Objects[x]
  38.  
  39.  
  40. Object *win;
  41.  
  42. struct MsgPort *AppPort;
  43. struct Screen *screen;
  44.  
  45. enum
  46. {
  47. OBJ_TOPTABS,
  48. OBJ_TOOLBAR,
  49. OBJ_CLICKTAB_1,
  50. OBJ_CLICKTAB_2,
  51. OBJ_CLICKTAB_3,
  52. OBJ_QUIT,
  53. OBJ_NUM
  54. };
  55.  
  56. enum
  57. {
  58. OBJ_IBUT_1,
  59. OBJ_SEL,
  60. OBJ_UNSEL,
  61. OBJ_IBUT_2,
  62. OBJ_GHOST,
  63. OBJ_UNGHOST,
  64. };
  65.  
  66. Object *Objects[OBJ_NUM];
  67.  
  68. #define OBJ(x) Objects[x]
  69. #define GAD(x) (struct Gadget *)Objects[x]
  70.  
  71. STRPTR TopTabs[] = {"Feeds", "Items", "Images", NULL};
  72.  
  73. STRPTR PageLabels_1[] = {"Required","Optional", "Extensions", "Advanced", NULL};
  74. STRPTR PageLabels_2[] = {"Required","Optional", "Advanced", NULL};
  75. STRPTR PageLabels_3[] = {"Image", "Editor", "Advanced",NULL};
  76.  
  77. struct Hook newprefshook;
  78.  
  79.  
  80. VOID prefshookfunc( struct Hook *me, APTR winobj, APTR reserved )
  81. {
  82. IExec->DebugPrintF("new prefs hook called\n");
  83. }
  84.  
  85.  
  86. Object *
  87. make_window(void)
  88. {
  89. /* create hook */
  90. newprefshook.h_Entry = (HOOKFUNC)prefshookfunc;
  91. newprefshook.h_SubEntry = NULL;
  92. newprefshook.h_Data = NULL;
  93.  
  94. Object
  95. *page1 = NULL,
  96. *page1a = NULL,
  97. *page1b = NULL,
  98. *page1c = NULL,
  99. *page1d = NULL,
  100. *page2 = NULL,
  101. *page2a = NULL,
  102. *page2b = NULL,
  103. *page2c = NULL,
  104. *page3 = NULL,
  105. *page3a = NULL,
  106. *page3b = NULL,
  107. *page3c = NULL;
  108.  
  109. // Some CHILD_WeightedHeight tags have been left
  110. // out to demonstrate the effects of the tag.
  111.  
  112. page1a = IIntuition->NewObject(NULL, "layout.gadget",
  113. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  114. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  115. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 1", TAG_DONE),
  116. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 2", TAG_DONE),
  117. TAG_DONE),
  118. CHILD_WeightedHeight, 0,
  119. TAG_DONE);
  120.  
  121. page1b = IIntuition->NewObject(NULL, "layout.gadget",
  122. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  123. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  124. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 3", TAG_DONE),
  125. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 4", TAG_DONE),
  126. TAG_DONE),
  127. CHILD_WeightedHeight, 0,
  128. TAG_DONE);
  129.  
  130. page1c = IIntuition->NewObject(NULL, "layout.gadget",
  131. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  132. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  133. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 5", TAG_DONE),
  134. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 6", TAG_DONE),
  135. TAG_DONE),
  136. CHILD_WeightedHeight, 0,
  137. TAG_DONE);
  138.  
  139. page1d = IIntuition->NewObject(NULL, "layout.gadget",
  140. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  141. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  142. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 7", TAG_DONE),
  143. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 8", TAG_DONE),
  144. TAG_DONE),
  145. CHILD_WeightedHeight, 0,
  146. TAG_DONE);
  147.  
  148. page1 = OBJ(OBJ_CLICKTAB_1) = IIntuition->NewObject(NULL, "clicktab.gadget",
  149. GA_Text, PageLabels_1,
  150. CLICKTAB_Current, 0,
  151. CLICKTAB_PageGroup, IIntuition->NewObject(NULL, "page.gadget",
  152. PAGE_Add, page1a,
  153. PAGE_Add, page1b,
  154. PAGE_Add, page1c,
  155. PAGE_Add, page1d,
  156. TAG_DONE),
  157. TAG_DONE);
  158.  
  159. page2a = IIntuition->NewObject(NULL, "layout.gadget",
  160. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  161. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  162. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 9", TAG_DONE),
  163. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 10", TAG_DONE),
  164. TAG_DONE),
  165. CHILD_WeightedHeight, 0,
  166. TAG_DONE);
  167.  
  168. page2b = IIntuition->NewObject(NULL, "layout.gadget",
  169. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  170. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  171. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 11", TAG_DONE),
  172. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 12", TAG_DONE),
  173. TAG_DONE),
  174. CHILD_WeightedHeight, 0,
  175. TAG_DONE);
  176.  
  177. page2c = IIntuition->NewObject(NULL, "layout.gadget",
  178. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  179. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  180. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 13", TAG_DONE),
  181. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 14", TAG_DONE),
  182. TAG_DONE),
  183. CHILD_WeightedHeight, 0,
  184. TAG_DONE);
  185.  
  186. page2 = OBJ(OBJ_CLICKTAB_2) = IIntuition->NewObject(NULL, "clicktab.gadget",
  187. GA_Text, PageLabels_2,
  188. CLICKTAB_Current, 0,
  189. CLICKTAB_PageGroup, IIntuition->NewObject(NULL, "page.gadget",
  190. PAGE_Add, page2a,
  191. PAGE_Add, page2b,
  192. PAGE_Add, page2c,
  193. TAG_DONE),
  194. TAG_DONE);
  195.  
  196. page3a = IIntuition->NewObject(NULL, "layout.gadget",
  197. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  198. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  199. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 15", TAG_DONE),
  200. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 16", TAG_DONE),
  201. TAG_DONE),
  202. CHILD_WeightedHeight, 0,
  203. TAG_DONE);
  204.  
  205. page3b = IIntuition->NewObject(NULL, "layout.gadget",
  206. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  207. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  208. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 17", TAG_DONE),
  209. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 18", TAG_DONE),
  210. TAG_DONE),
  211. CHILD_WeightedHeight, 0,
  212. TAG_DONE);
  213.  
  214. page3c = IIntuition->NewObject(NULL, "layout.gadget",
  215. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  216. LAYOUT_AddChild, IIntuition->NewObject(NULL, "layout.gadget",
  217. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 19", TAG_DONE),
  218. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "Button 20", TAG_DONE),
  219. TAG_DONE),
  220. CHILD_WeightedHeight, 0,
  221. TAG_DONE);
  222.  
  223. page3 = OBJ(OBJ_CLICKTAB_3) = IIntuition->NewObject(NULL, "clicktab.gadget",
  224. GA_Text, PageLabels_3,
  225. CLICKTAB_Current, 0,
  226. CLICKTAB_PageGroup, IIntuition->NewObject(NULL, "page.gadget",
  227. PAGE_Add, page3a,
  228. PAGE_Add, page3b,
  229. PAGE_Add, page3c,
  230. TAG_DONE),
  231. TAG_DONE);
  232.  
  233. OBJ(OBJ_TOPTABS) = IIntuition->NewObject(NULL, "clicktab.gadget",
  234. GA_Text, TopTabs,
  235. CLICKTAB_Current, 0,
  236. CLICKTAB_PageGroup, IIntuition->NewObject(NULL, "page.gadget",
  237. PAGE_Add, page1,
  238. PAGE_Add, page2,
  239. PAGE_Add, page3,
  240. TAG_DONE),
  241. TAG_DONE);
  242.  
  243. /* OBJ(OBJ_IBUT_1) = ButtonObject,
  244.   BUTTON_BevelStyle, BVS_NONE,
  245.   BUTTON_Transparent, TRUE,
  246.   BUTTON_RenderImage, OBJ(OBJ_SEL) = BitMapObject,
  247.   BITMAP_SourceFile, "tbimages:world",
  248.   BITMAP_DisabledSourceFile, "tbimages:world_g",
  249.   BITMAP_Screen, screen,
  250.   BITMAP_Masking, TRUE,
  251.   BitMapEnd,
  252.   BUTTON_SelectImage, OBJ(OBJ_UNSEL) = BitMapObject,
  253. BITMAP_SourceFile, "tbimages:world_s",
  254. BITMAP_Screen, screen,
  255. BITMAP_Masking, TRUE,
  256. BitMapEnd,
  257. ButtonEnd;
  258.  
  259.   OBJ(OBJ_TOOLBAR) = (LAYOUT_AddChild, OBJ(OBJ_IBUT_1) );
  260. // CHILD_WeightedWidth, 0,
  261.   // CHILD_WeightedHeight, 0); */
  262.  
  263. return IIntuition->NewObject(NULL, "window.class",
  264. WA_ScreenTitle, "ReAction Example",
  265. WA_Title, "ClickTab Example",
  266. WA_DragBar, TRUE,
  267. WA_CloseGadget, TRUE,
  268. WA_SizeGadget, TRUE,
  269. WA_DepthGadget, TRUE,
  270. WA_Activate, TRUE,
  271. WINDOW_IconifyGadget, TRUE,
  272. WINDOW_IconTitle, "Iconified",
  273. WINDOW_AppPort, AppPort,
  274. WINDOW_NewPrefsHook, &newprefshook,
  275. WINDOW_Position, WPOS_CENTERSCREEN,
  276. WINDOW_Layout, IIntuition->NewObject(NULL, "layout.gadget",
  277. LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
  278.  
  279. // LAYOUT_AddChild, OBJ(OBJ_TOOLBAR),
  280.  
  281. LAYOUT_AddChild, OBJ(OBJ_TOPTABS),
  282.  
  283. LAYOUT_AddChild, IIntuition->NewObject(NULL, "button.gadget", GA_Text, "_Quit", GA_ID, OBJ_QUIT, GA_RelVerify, TRUE, TAG_DONE),
  284. CHILD_WeightedHeight, 0,
  285.  
  286. TAG_DONE),
  287. TAG_DONE);
  288. }
  289.  
  290.  
  291. int
  292. main()
  293. {
  294. struct Window *window;
  295.  
  296. if (screen=IIntuition->LockPubScreen(NULL))
  297. {
  298. win = make_window();
  299.  
  300. if (window = RA_OpenWindow(win))
  301. {
  302. uint32
  303. sigmask = 0,
  304. siggot = 0,
  305. result = 0;
  306. uint16
  307. code = 0,
  308. ghost = 0;
  309. BOOL
  310. done = FALSE;
  311.  
  312. IIntuition->GetAttr(WINDOW_SigMask, win, &sigmask);
  313. }
  314.  
  315. if (AppPort = IExec->AllocSysObjectTags(ASOT_PORT, TAG_DONE))
  316. {
  317. if (window = (struct Window*)IIntuition->IDoMethod(win, WM_OPEN))
  318. {
  319. uint32
  320. sigmask = 0,
  321. siggot = 0,
  322. result = 0;
  323. uint16
  324. code = 0;
  325. BOOL
  326. done = FALSE;
  327.  
  328. IIntuition->GetAttr(WINDOW_SigMask, win, &sigmask);
  329. while (!done)
  330. {
  331. siggot = IExec->Wait(sigmask | SIGBREAKF_CTRL_C);
  332. if (siggot & SIGBREAKF_CTRL_C) done = TRUE;
  333. while ((result = IIntuition->IDoMethod(win, WM_HANDLEINPUT, &code)))
  334. {
  335. switch(result & WMHI_CLASSMASK)
  336. {
  337. case WMHI_CLOSEWINDOW:
  338. done = TRUE;
  339. break;
  340. case WMHI_GADGETUP:
  341. switch (result & WMHI_GADGETMASK)
  342. {
  343. case OBJ_QUIT:
  344. done=TRUE;
  345. break;
  346. }
  347. break;
  348. case WMHI_ICONIFY:
  349. if (IIntuition->IDoMethod(win, WM_ICONIFY)) window = NULL;
  350. break;
  351. case WMHI_UNICONIFY:
  352. window = (struct Window*)IIntuition->IDoMethod(win, WM_OPEN);
  353. break;
  354. }
  355. }
  356. }
  357. }
  358.  
  359. if (win) IIntuition->DisposeObject(win);
  360. // if (OBJ(OBJ_UNGHOST)) IIntuition->DisposeObject(OBJ(OBJ_UNGHOST));
  361. // if (OBJ(OBJ_GHOST)) IIntuition->DisposeObject(OBJ(OBJ_GHOST));
  362. // if (OBJ(OBJ_UNSEL)) IIntuition->DisposeObject(OBJ(OBJ_UNSEL));
  363. // if (OBJ(OBJ_SEL)) IIntuition->DisposeObject(OBJ(OBJ_SEL));
  364.  
  365. // IIntuition->UnlockPubScreen(NULL,screen);
  366. IExec->FreeSysObject(ASOT_PORT, AppPort);
  367. }
  368. }
  369. }
trixie
trixie's picture
Offline
Last seen: 5 months 11 hours ago
Joined: 2011-02-03 13:58
To create toolbars, use

To create toolbars, use speedbar.gadget, not a row of button.gadgets!

First you'll need to create a bitmap.image for each toolbar button:

  1. Object *create_bitmap(struct Screen *scr, const char *sourcefile)
  2. {
  3. return IIntuition->NewObject(NULL, "bitmap.image",
  4. BITMAP_SourceFile, sourcefile,
  5. BITMAP_Screen, scr,
  6. BITMAP_Masking, TRUE,
  7. TAG_DONE);
  8. }

Then allocate an Exec list for the speedbar:

  1. struct List *listSpeedBar;
  2. listSpeedBar = (struct List *)IExec->AllocSysObjectTags(ASOT_LIST, TAG_DONE);

Then you must add the speedbar buttons. They are added as list nodes

add_sbar_node(listSpeedBar, 1, bitmap1);
add_sbar_node(listSpeedBar, 2, bitmap2);
add_sbar_node(listSpeedBar, 3, bitmap3);
etc., using the function below:

  1. void add_sbar_node(struct List *list, uint16 id, Object *image)
  2. {
  3. struct Node *node = NULL;
  4.  
  5. if ( (node = ISpeedBar->AllocSpeedButtonNode(id,
  6. SBNA_UserData, id,
  7. SBNA_Image, image,
  8. SBNA_Enabled, TRUE, // display button in speedbar
  9. SBNA_Spacing, 2,
  10. SBNA_Highlight, SBH_RECESS,
  11. TAG_DONE)) )
  12. {
  13. IExec->AddTail(list, node);
  14. }
  15.  
  16. }

Finally, you create the speedbar object:

  1. speedbar = IIntuition->NewObject(NULL, "speedbar.gadget",
  2. GA_ID, GID_TOOLBAR,
  3. GA_RelVerify, TRUE,
  4. SPEEDBAR_Orientation, SBORIENT_HORIZ,
  5. SPEEDBAR_Buttons, listSpeedBar,
  6. TAG_DONE);

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
I suppose that might work,

I suppose that might work, but AISS icons have a selected state as well (not just the recess), just check out the refresh button in OWB, the arrows change position.

But its a good start anyway.. gives me some progress.

Now gotta work out to add menus... not getting far with that either.

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

salass00
salass00's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-02-03 11:27
This is the code that I use

This is the code that I use in DiskImageGUI to load AISS images:

  1. /*
  2. ** OpenAmiga.org
  3. ** This file is part of the OpenAmiga "Disk image device project"
  4. **
  5. ** For more information look at:
  6. ** openamiga.org/?function=viewproject&projectid=38
  7. */
  8.  
  9. #include "diskimagegui.h"
  10. #include <proto/dos.h>
  11. #include <proto/utility.h>
  12. #include <proto/intuition.h>
  13.  
  14. static BPTR FileExists (CONST_STRPTR dir, CONST_STRPTR file, STRPTR path, int32 path_size) {
  15. BPTR fh;
  16. IUtility->Strlcpy(path, dir, path_size);
  17. IDOS->AddPart(path, file, path_size);
  18. fh = IDOS->Open(path, MODE_OLDFILE);
  19. IDOS->Close(fh);
  20. return fh;
  21. }
  22.  
  23. BOOL FindImage (CONST_STRPTR image, STRPTR path, int32 path_size) {
  24. return FileExists("PROGDIR:", image, path, path_size)
  25. || FileExists("PROGDIR:Images", image, path, path_size)
  26. || FileExists("SYS:Prefs/Presets/Images", image, path, path_size)
  27. || FileExists("TBImages:", image, path, path_size);
  28. }
  29.  
  30. Object *LoadImage (struct Screen *screen, CONST_STRPTR image, BOOL selected, BOOL disabled) {
  31. TEXT normal_path[64];
  32. TEXT selected_path[64];
  33. TEXT disabled_path[64];
  34. if (!FindImage(image, normal_path, sizeof(normal_path))) {
  35. return NULL;
  36. }
  37. IUtility->Strlcpy(selected_path, normal_path, sizeof(selected_path));
  38. IUtility->Strlcat(selected_path, "_s", sizeof(selected_path));
  39. IUtility->Strlcpy(disabled_path, normal_path, sizeof(disabled_path));
  40. IUtility->Strlcat(disabled_path, "_g", sizeof(disabled_path));
  41. return BitMapObject,
  42. BITMAP_Screen, screen,
  43. BITMAP_SourceFile, normal_path,
  44. selected ? BITMAP_SelectSourceFile : TAG_IGNORE, selected_path,
  45. disabled ? BITMAP_DisabledSourceFile : TAG_IGNORE, disabled_path,
  46. BITMAP_Masking, TRUE,
  47. End;
  48. }
djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
Hello, Okay I need a brave

Hello,

Okay I need a brave soul, I downloaded GUIDesigner by Tuomas Hokka.

http://www.os4depot.net/index.php?function=showfile&file=development/guitool/guidesigner.lha

And successfully built part of a GUI, but the program doesn't produce code as such just the XML layout of the buttons and such like. Now sadly the GUIDesigner doesn't allow me to add ClickTabs and numerous other things like Labels and File buttons.

I was hoping someone could download the .project files load them into GUIDesigner. hit the Create Code button and get them into a useable C source code that I can pick up and run with it. Not only that, I need some menus so need basic structure in there that I can go ahead and edit at well.

Also if someone can look at the layout files and replace where it says 'this should be a clicktab', 'this should be a label' etc etc etc

Yeah I know I am asking a lot, but if someone can do that for me - well that would be amazing helpful!!!

Okay so the project files, http://www.beaverpromotions.co.uk/smile.lha.

Wanted to hosted them on amigaos.net, but well I left the Mac at work and I haven't got an ftp client configured for sftp connections yet so the above link for now.

Once again, aside from GUIDesigner there is no decent Gui builder for OS4 and I can't wait for AVD so if you have an hour or two to devote to getting me up and running I would be truly grateful.

OR ALTERNATIVELY:

If you can import at least one layout from GUIDesigner to look the same in Emperor that would be just as impressive as I could take it from there, but alas I cannot not fathom Emperor out.. the layout all appears to be broken or at least in the preview window. :S

Cheers, Rick.

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

salass00
salass00's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-02-03 11:27
@djrikki I've never used

@djrikki

I've never used GUIDesigner so I can't help you with that, but if you just need example source on how to create and use labels, file buttons and clicktabs then SRec GUI has all of those and you are free to browse and download its source code on sourceforge.net (the part that would probably be of most interest to you would be the CreateSRecGUI function):
http://srec.svn.sourceforge.net/viewvc/srec/src/gui.c?revision=1&view=markup

BTW your project files link doesn't work as there's an extra dot ('.') at the end of the url.

djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
I'll take a look when I get

I'll take a look when I get home.

Sorry yeah the url is http://www.beaverpromotions.co.uk/smile.lha

Salass00, GUIDesigner is a tiny program, when you a load project in it and hit the Create Code button it outputs the code to RAM Disk. It takes less than 5 minutes to look at it.

Basically its just the pure structure ya know, Add_Child blah blah Layout_Orientation = HORIZ... all that stuff.

I will take a look at source code you mentioned as well.

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
I've actually returned to

I've actually returned to Emperor and had a lot of success this evening once I started toggling with the Fixed Height and Width Layout buttons for Horiz/Vert Layout objects. They solved the problem I was having.

But a new problem has arrised, best show you a screen shot.

IMAGE(http://www.beaverpromotions.co.uk/emperorproblem_text.jpg)

Click here for image

I have a Click Tab with 3 pages called 'Top Level Tabs' in the structure - Feeds, Images and Items.

I can access the Feeds page just fine, but when I click on the tab of the other pages its not showing anything!!! I feel I've already tried every combination under the sun.

Here is the project file that you can load straight into Emperor and see what I mean.

Right-Click to download

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
@ salass00 Have you taken a

@ salass00

Have you taken a look at the project yet in Emperor to see where I am going wrong? Kas1e says your a bit of an expert at Reaction layouts, and well we know he is personally busy with MUI-OWB.

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

trixie
trixie's picture
Offline
Last seen: 5 months 11 hours ago
Joined: 2011-02-03 13:58
Quote:Have you taken a look

Have you taken a look at the project yet in Emperor to see where I am going wrong?

I'm afraid you're going wrong in trying to use half-baked GUI builders no one really uses :-)

This bit caught my eye:

vertical page Images
horizontal page 8
vertical layout 11
Items toolbar
Listbrowser 1

What are the two page objects here? They are not both page.gadgets, are they? Why would you put a page inside a page in such a simple layout?

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
If I have followed the

If I have followed the instructions in Emperor.guide correctly, this was necessary to get the ClickTabs working.

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

trixie
trixie's picture
Offline
Last seen: 5 months 11 hours ago
Joined: 2011-02-03 13:58
AFAIK you only associate one

AFAIK you only associate one page.gadget with a clicktab.gadget. The individual pages under the tabs are layouts, not page.gadgets.

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

salass00
salass00's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-02-03 11:27
Quote: AFAIK you only


AFAIK you only associate one page.gadget with a clicktab.gadget. The individual pages under the tabs are layouts, not page.gadgets.

It's possible that Emperor hides this detail from the user. At least I couldn't find any way to create page gadgets with it.

trixie
trixie's picture
Offline
Last seen: 5 months 11 hours ago
Joined: 2011-02-03 13:58
@salass00 Quote:It's possible

@salass00

It's possible that Emperor hides this detail from the user.

Yes, that's possible. This is why it's quite difficult to give advice if you don't know what's going on inside Emperor.

AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2

gazelle
gazelle's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-04-13 12:52
@djrikki If I interpret your

@djrikki

If I interpret your example you have done it like this:

  1. Top Level Tabs (clicktab)
  2. |
  3. +- vertical page Feeds
  4. | |
  5. | +- ...
  6. | +- ...
  7. |
  8. +- vertical page Images
  9. | |
  10. | +- ...
  11. | +- ...
  12. |
  13. +- vertical page Items
  14. |
  15. +- ...
  16. +- ...

but if I read the Guides/ClicktabExample.README! I would do it like:

  1. Top Level Tabs (clicktab)
  2. |
  3. +- vertical page Group
  4. |
  5. +- vertical page Feeds
  6. | |
  7. | +- ...
  8. | +- ...
  9. |
  10. +- vertical page Images
  11. | |
  12. | +- ...
  13. | +- ...
  14. |
  15. +- vertical page Items
  16. |
  17. +- ...
  18. +- ...

I have no OS4, so I can't try it out but you can.

Log in or register to post comments