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 » U++ Library support » Menus&Toolbars » menu items in bar stays for a while...
Re: menu items in bar stays for a while... [message #3662 is a reply to message #3555] Mon, 12 June 2006 10:28 Go to previous messageGo to previous message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
only the 'menu' related items:


.cpp file, constructor:
...
AddFrame(menu);
menu.Set(THISBACK(Menu));
...


.h file, inside the only class:
...
private:

MenuBar menu;

void Menu(Bar& menu) {
    menu.Add("File", THISBACK(File));
}

void File(Bar& menu) {
    menu.Add("New", THISBACK(New));
    menu.MenuSeparator();
    menu.Add("Load", THISBACK1(Load, "nic"));  // "nic" - just a dummy thing
    menu.Add("Save", THISBACK(Save));
    menu.MenuSeparator();
    menu.Add("Load scheme", THISBACK1(LoadSch, false));
    menu.Add("Save scheme", THISBACK(SaveSch));
    menu.MenuSeparator();
    menu.Add("Exit", THISBACK(Close));  // Close() - original "API" function
}

// definition of these is in .cpp file
void Reset();
void New();
public:
void Load(String file);     // public because of calling before .Run() in main
void LoadSch(bool start);
private:
void Save();
void SaveSch();
...


upp examples works.

[Updated on: Mon, 12 June 2006 10:51]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EditString in toolbar doesn't work
Next Topic: How to disable focusing menu using TAB key
Goto Forum:
  


Current Time: Sun Jun 02 08:08:34 CEST 2024

Total time taken to generate the page: 0.01669 seconds