A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/menu__service__impl_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/framework/menu_service_impl.cpp Source File

65

wxMenuBar::SetAutoWindowMenu(

false

);

66

wxApp::s_macHelpMenuTitleName =

wxT

(

"&Help"

);

98  m_Frame

->GetEventHandler()->AddPendingEvent(event);

106

wxMenu* menu =

new

wxMenu();

109

unique_ptr<const wxMenu> c_menu( contributor.

GetMenu

() );

111  Merge

(*menu, *c_menu);

123

wxMenuBar* newBar =

new

wxMenuBar();

125

wxMenuItemList& items = menu->GetMenuItems();

126  ITERATE

( wxMenuItemList, it, items ){

127

wxMenuItem* item = *it;

128  if

( item->GetSubMenu() ){

129

wxMenu* sub_menu =

CloneMenu

( *item->GetSubMenu() );

132

wxString

label

= wxStripMenuCodes(item->GetItemLabelText(), wxStrip_Mnemonics);

133

newBar->Append( sub_menu,

label

);

139

unique_ptr<wxMenuBar> oldBar(

m_Frame

->GetMenuBar());

147

newBar->MacInstallMenuBar();

158  if

(contributor ==

NULL

) {

159  ERR_POST

(

"CMenuService::AddContributor() - NULL contributor."

);

161

TContributors::const_iterator it =

167  ERR_POST

(

"CMenuService::AddContributor() - contributor already added"

);

177  if

(contributor ==

NULL

) {

178  ERR_POST

(

"CMenuService::AddContributor() - NULL contributor."

);

180

TContributors::iterator it =

183  ERR_POST

(

"CMenuService::RemoveContributor() - not found"

);

CUICommandRegistry is a centralized registry where all application commands should be registered.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

virtual void ResetMenuBar()

virtual void ShutDownService()

virtual void AddPendingCommand(int cmd)

add commands for processing (simulates choosing the command from a menu)

virtual void AddContributor(IMenuContributor *contributor)

the service does NOT assume ownership of the contributor

virtual void SetFrame(wxFrame *frame, CUICommandRegistry &cmd_reg)

virtual void RemoveContributor(IMenuContributor *contributor)

CUICommandRegistry * m_CmdReg

virtual void InitService()

TContributors m_Contributors

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static const char label[]

wxEVT_COMMAND_MENU_SELECTED

void Merge(wxMenu &menu_1, const wxMenu &menu_2)

merges all items form menu_2 into menu_1, preserving the structure if possible

wxMenu * CloneMenu(const wxMenu &menu)

create a copy of the given menu

void CleanupSeparators(wxMenu &menu)

Removes extra separators (in the begining or at the end of the menu, ot those that precede other sepa...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4