Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
130 user(s) are online (113 user(s) are browsing Forums)

Members: 0
Guests: 130

more...

Support us!

Headlines

 
  Register To Post  

Alternative to GadTools for menus?
Home away from home
Home away from home


See User information
Is there a better way than GadTools for Amiga menus? Because GadTools really really *really* sucks at menus: Terribly verbose for declaring them, hard to use more advanced features (like ghosted items & tick boxes), and the implicit numbering of all items means a major headache when you want to make even minor changes. I just found this, which would seem to suggest there isn't anything better.

After my experience with them in RunInUAE, I ended-up writing a tiny module (in PortablE) which basically fixes all the problems I saw. I can now define menus using compact tag lists, the more advanced features are trivial to use, and modifying the menu doesn't cause major issues.

P.S. I tried posting this on UtilityBase, but it just bombed-out with a database error every time.

Author of the PortablE programming language.
Go to top
Re: Alternative to GadTools for menus?
Not too shy to talk
Not too shy to talk


See User information
@ChrisH

Well, if you're using window.class, you can at least pass a newmenu structure directly, rather than having to open gadtools, obtain a visual info, and layout the menus first.

Go to top
Re: Alternative to GadTools for menus?
Amigans Defender
Amigans Defender


See User information
@xeron

But you must be careful about one thing. WINDOW_NewMenu takes a global array of struct NewMenu that is referenced every time the window is open or reopen. So if some of your menu items change state (ticked, ghosted...) during program use, and you iconify+deiconify its window, your menu strip will NOT remember its state before iconification and will, instead, reset to the initial settings passed in the NewMenu array.

WINDOW_NewMenu was a good idea and allows attaching menus in an easy way but I'm not sure that the above has been taken into account. In my opinion, the implementation of this tag was a little thoughtless.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Alternative to GadTools for menus?
Amigans Defender
Amigans Defender


See User information
A menu.class which allows defining menus, returns a struct NewMenu and can handle dynamic changes automatically is sorely needed.

I think this is what the OpenAmiga project is, but it's way beyond my ability, plus I have too much other stuff to do (such as the OpenAmiga structured art datatype which is progressing incredibly slowly)

Go to top
Re: Alternative to GadTools for menus?
Home away from home
Home away from home


See User information
@Chris Quote:
A menu.class which allows defining menus, returns a struct NewMenu and can handle dynamic changes automatically is sorely needed.

My own solution completely hides it's implementation, so you don't see the NewMenu structure it creates - and I really think that's the best way.

Author of the PortablE programming language.
Go to top
Re: Alternative to GadTools for menus?
Amigans Defender
Amigans Defender


See User information
@Chris

Quote:

Chris wrote:
A menu.class which allows defining menus, returns a struct NewMenu and can handle dynamic changes automatically is sorely needed.

Rather, it should return a BOOPSI object that would be then attached to the window object.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Alternative to GadTools for menus?
Amigans Defender
Amigans Defender


See User information
Well, whatever is best If it can hide all the structures so much the better, as long as it can do everything the other OS functions which need those structures can do.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project