Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » User configurable menu system
User configurable menu system [message #33991] Fri, 07 October 2011 21:21 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi all,

I started to code an user-configurable menu system, with draggable toolbars.
By now, just the drag/dock system works; there's still much work to do, in detail :

1- Figure out an interface similar to Upp toolbar one, so with a callback to add menu entries which will then be configured by users.
I'm thinking to a callback similar to Upp one, to add built-in commands, plus a way to add user commands that call a fixed callback function passing one or more command string

2- A menu/toolbar editor. It should be able to edit menu, toolbars and submenu items, both built-in ones and user-defined ones, see point 1.

3- Some better graphic and skinning. By now it just works, but it's not so nice looking Smile

4- Load/store mechanics, but those depends strongly on point 1 and 2.

5- Well... any idea is welcome.

As the needed code time isn't so small, I'm in search of help, in particular for point 2 and 3 !

If you want to see it at work, just run TextXMLMenu package.

Ciao

Max

[Updated on: Tue, 18 October 2011 20:09]

Report message to a moderator

Re: User configurable menu system - XMLMenu - Help requested ! [message #33994 is a reply to message #33991] Fri, 07 October 2011 21:55 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

Excellent. It is really needed to have this kind of menus.

It is called "XMLMenu" but, are they loaded from an XML file?. I have hot found it. For me it is better the menus to be in the .exe instead of in an external file.

When moving menus sometimes they get inaccessible without any frame (see the picture). Is it a feature or a bug?

index.php?t=getfile&id=3464&private=0
  • Attachment: dib.PNG
    (Size: 17.49KB, Downloaded 843 times)


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #33995 is a reply to message #33994] Fri, 07 October 2011 22:12 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi Koldo,

I named XMLMenu because I'd like to have menu configuration loaded from an external xml file, of course.
You could, of course, supply an initial configuration from inside the exe file and allow the user to modify it and store an xml file externally.

The bug you found is a bug, not a feature Smile
I had also in my pc, and seemed solved, but with an hack.
I'll re-test it in windows to see if it's not solved there.
I don't know why, but sometimes popup controls (the ones used when dragging....) don't get or loose mouse capture and so events.

Max

Edit : Right, Koldo, the bug is present in windows Sad
I'll have to work a bit more on it.

Max

[Updated on: Fri, 07 October 2011 22:21]

Report message to a moderator

Re: User configurable menu system - XMLMenu - Help requested ! [message #34019 is a reply to message #33995] Mon, 10 October 2011 13:22 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Package has been moved to sandbox, as it's still in early development phase.
Please get it from there if you want to test !

Ciao

Max
Re: User configurable menu system - XMLMenu - Help requested ! [message #34022 is a reply to message #34019] Mon, 10 October 2011 20:37 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Koldo,

now the bug you found should be fixed also for Windows... could you please retest it ?
(it's in sandbox now, no more in bazaar for the moment)

Max
Re: User configurable menu system - XMLMenu - Help requested ! [message #34023 is a reply to message #34019] Mon, 10 October 2011 21:27 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

The last problems are solved.

The only thing is this: The menus in the lower side get "stuck" and they cannot be moved.

index.php?t=getfile&id=3472&private=0

I like these menus. They should substitute actual menus (perhaps having an option to be fixed or floating).
A thing I would change is the use of new and pointers. Could the be removed?

The icons are nice. Where did you get them?.
  • Attachment: dib.PNG
    (Size: 14.13KB, Downloaded 876 times)


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #34024 is a reply to message #34023] Mon, 10 October 2011 21:43 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi Koldo,

the bottom bug was known, and finally I could resolve it Smile
If you can test it again it'll be good Smile

BTW, don't look at new.... stuffs, it's just for testing.
Now that docking works well, I'm starting to think on how to manage to have a nice programming interface.

Icons (IIRC !) are from some ubuntu icon set. Don't remember exactly which, but you can lurk inside standard ubuntu themes !

Max

[Updated on: Mon, 10 October 2011 21:44]

Report message to a moderator

Re: User configurable menu system - XMLMenu - Help requested ! [message #34026 is a reply to message #34024] Tue, 11 October 2011 09:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

Unfortunately now all the menus are blocked (in XP).


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #34027 is a reply to message #34026] Tue, 11 October 2011 13:09 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Eh ??? I've tested it in XP and it seems ok....
I'll retest immediately.

Max

EDIT : I've just re-tested it, it works perfectly in XP under VirtualBox......

Max

[Updated on: Tue, 11 October 2011 13:14]

Report message to a moderator

Re: User configurable menu system - XMLMenu - Help requested ! [message #34028 is a reply to message #34027] Tue, 11 October 2011 16:53 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

I have redownloaded the files from Google Code (I do not have svn here) and it works well in XP.

Please go ahead with the nicer programming interface, and perhaps the toolbars could be "slimmer".

I like them. Thank you.


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #34030 is a reply to message #34028] Tue, 11 October 2011 20:32 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Thank you for testing Smile

I've started to code the programming interface and XML load/save configuration.
I hope to have something to share on next days.

Ciao

Max
Re: User configurable menu system - XMLMenu - Help requested ! [message #34043 is a reply to message #34030] Thu, 13 October 2011 16:03 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Updated substantially :

- Separation from commands and menus, see demo app

- Can preset menus and toolbar positions

Still missing XML load/save; this one is trivial and I'll add in short

Still missing a nice menu/toolbar editor, and that one is *not* trivial, so, if somebody wants to help is wellcome Smile

Max

p.s.: Koldo, could you test it please ?
Re: User configurable menu system - XMLMenu - Help requested ! [message #34044 is a reply to message #34043] Thu, 13 October 2011 17:00 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

Quote:

Still missing a nice menu/toolbar editor
I am intrigued. Is that necessary?. Now AFAIK U++ has not a menu editor.


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #34045 is a reply to message #34044] Thu, 13 October 2011 17:45 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
koldo wrote on Thu, 13 October 2011 17:00

Hello Massimo

Quote:

Still missing a nice menu/toolbar editor
I am intrigued. Is that necessary?. Now AFAIK U++ has not a menu editor.


IMHO yes, having a configurable menu system needs a menu/toolbars editor too. Just think to some application like cad, which has tons of commands.... I use cad much, and the first thing I do is to re-configure toolbars and menu with my most-used commands easily available, the less used in some sub-menus and the seldom used completely without menu/toolbar entry.
And, I can assure you, my cad screen is anyways *full* of toolbars Smile

So, if you see in my demo, I've chosen this way :

1) A callback to associate an ID (String) to each available command in my app

2) A callback to setup initial appearance of menus; it associates each command ID with a menu entry

3) The same for toolbars.

Now, the editor should change the associations and be able to move menu/toolbars entries from one side to another, or create new ones and delete some unneeded.

Max
Re: User configurable menu system - XMLMenu - Help requested ! [message #34053 is a reply to message #34045] Thu, 13 October 2011 21:53 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

It works well in XP. Perhaps faster?

The interface looks much better... could you move it to Bazaar? Smile


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #34056 is a reply to message #34053] Thu, 13 October 2011 22:17 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
koldo wrote on Thu, 13 October 2011 21:53

Hello Massimo

It works well in XP. Perhaps faster?



Hi Koldo, thank you for testing Smile

Quote:


The interface looks much better... could you move it to Bazaar? Smile


Not yet... I'm working to complete it with an menu/toolbar editor and xml configuration streaming.
It'll not the best looking stuff I've made, but I guess for now it'll be more than enough Smile
If somebody with time can do it better I'll be very happy about.

When done with the above parts I'll move to Bazaar.

Ciao

Max
Re: User configurable menu system - XMLMenu - Help requested ! [message #34087 is a reply to message #34056] Mon, 17 October 2011 01:13 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi Koldo,

XMLMenu package is almost completed... still miss something in menu editor and xml streaming, but those are quite easy stuffs.

Could you please check it ? To edit menus, just right click on a toolbar and select 'customize'.

Ciao

Max
Re: User configurable menu system - XMLMenu - Help requested ! [message #34093 is a reply to message #34087] Mon, 17 October 2011 21:40 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

It is almost finished.

There is a division by zero problem here, easily solved with added code:

void XMLBarsEditor::Layout(void)
{
	if (GetSize().cx == 0)	//Added to avoid division between zero
		return;
	horzSplitter.SetPos(10000 * selectorSize.cx / GetSize().cx);
}


In window 3, the "Separator" creates a second level in the tree. However IMHO it would have to be just a separator:

index.php?t=getfile&id=3476&private=0

Now the commands can be moved in window 3, but they cannot be moved from 1 to 3 or from 3 to 1 (or to "trash bin").
  • Attachment: d.PNG
    (Size: 31.63KB, Downloaded 745 times)


Best regards
Iñaki
Re: User configurable menu system - XMLMenu - Help requested ! [message #34096 is a reply to message #34093] Mon, 17 October 2011 22:26 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Yep, this is work in progress Smile
Also the div/0 I think it's solved now... but I guess I'll finish all the stuff in a day or two, then move to bazaar again.

Ciao

Max

p.s.: how did you get division by zero ? I got on the beginning, but I thought it was solved.... can you reproduce it ?

[Updated on: Mon, 17 October 2011 22:27]

Report message to a moderator

Re: User configurable menu system - XMLMenu - Help requested ! [message #34097 is a reply to message #34096] Tue, 18 October 2011 08:05 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Massimo

Quote:

how did you get division by zero ?


For yesterday afternoon version I got it always. Wink


Best regards
Iñaki
Previous Topic: New Tiny C Compiler Package
Next Topic: Updater package
Goto Forum:
  


Current Time: Thu Mar 28 18:53:01 CET 2024

Total time taken to generate the page: 0.01930 seconds