这篇教程C++ CreateStatusBar函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CreateStatusBar函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateStatusBar函数的具体用法?C++ CreateStatusBar怎么用?C++ CreateStatusBar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CreateStatusBar函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: wxFrameFindPath::FindPath( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style ) : wxFrame( parent, id, title, position, size, style ){ CreateMyMenuBar(); CreateMyToolBar(); CreateStatusBar(1); SetStatusText( wxT("Welcome!") ); // insert main window here}
开发者ID:brock7,项目名称:TianLong,代码行数:13,
示例2: wxFrameMyFrame::MyFrame(const wxString & title) : wxFrame(NULL, wxID_ANY, title) { wxMenu * fileMenu = new wxMenu; wxMenu * helpMenu = new wxMenu; helpMenu->Append(wxID_ABOUT, wxT("About"), wxT("About dialog")); fileMenu->Append(wxID_EXIT, wxT("Exit"), wxT("Quit this program")); wxMenuBar *menuBar = new wxMenuBar(); menuBar->Append(fileMenu,wxT("File")); menuBar->Append(helpMenu,wxT("Help")); SetMenuBar(menuBar); CreateStatusBar(2); SetStatusText(wxT("Welcome to PTA Tool"));}
开发者ID:fern17,项目名称:PTA-Tool,代码行数:13,
示例3: wxFrameMyFrame::MyFrame(const wxString& title): wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(500,300)){ m_simplePopup = m_scrolledPopup = NULL; SetIcon(wxICON(sample));#if wxUSE_MENUS wxMenu *menuFile = new wxMenu; // the "About" item should be in the help menu wxMenu *helpMenu = new wxMenu; helpMenu->Append(Minimal_About, wxT("&About/tF1"), wxT("Show about dialog")); menuFile->Append(Minimal_TestDialog, wxT("&Test dialog/tAlt-T"), wxT("Test dialog")); menuFile->Append(Minimal_Quit, wxT("E&xit/tAlt-X"), wxT("Quit this program")); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar(); menuBar->Append(menuFile, wxT("&File")); menuBar->Append(helpMenu, wxT("&Help")); // ... and attach this menu bar to the frame SetMenuBar(menuBar);#endif // wxUSE_MENUS#if wxUSE_STATUSBAR // create a status bar just for fun (by default with 1 pane only) CreateStatusBar(2); SetStatusText(wxT("Welcome to wxWidgets!"));#endif // wxUSE_STATUSBAR wxPanel *panel = new wxPanel(this, -1); wxButton *button1 = new wxButton( panel, Minimal_StartSimplePopup, wxT("Show simple popup"), wxPoint(20,20) ); wxButton *button2 = new wxButton( panel, Minimal_StartScrolledPopup, wxT("Show scrolled popup"), wxPoint(20,70) ); m_logWin = new wxTextCtrl( panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); m_logWin->SetEditable(false); wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin ); m_logOld = logger->SetActiveTarget( logger ); logger->DisableTimestamp(); wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL ); topSizer->Add( button1, 0, wxALL, 5 ); topSizer->Add( button2, 0, wxALL, 5 ); topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 ); panel->SetSizer( topSizer );}
开发者ID:ruifig,项目名称:nutcracker,代码行数:51,
示例4: CreateStatusBarbool wxGISApplication::CreateApp(void){ CreateStatusBar(); wxFrame::GetStatusBar()->SetStatusText(_("Ready")); if(!wxGISApplicationBase::CreateApp()) return false; //load commandbars SerializeCommandBars(); //load accelerators m_pGISAcceleratorTable = new wxGISAcceleratorTable(this); wxGISAppConfig oConfig = GetConfig(); if(!oConfig.IsOk()) return false; // create MenuBar wxXmlNode* pMenuBarNode = oConfig.GetConfigNode(enumGISHKCU, GetAppName() + wxString(wxT("/frame/menubar"))); m_pMenuBar = new wxGISMenuBar(wxMB_DOCKABLE, this, pMenuBarNode); //wxMB_DOCKABLE SetMenuBar(static_cast<wxMenuBar*>(m_pMenuBar)); //mark menues from menu bar as enumGISTAMMenubar for(size_t i = 0; i < m_CommandBarArray.GetCount(); ++i) if(m_pMenuBar->IsMenuBarMenu(m_CommandBarArray[i]->GetName())) m_CommandBarArray[i]->SetType(enumGISCBMenubar); // min size for the frame itself isn't completely done. // see the end up wxAuiManager::Update() for the test // code. For now, just hard code a frame minimum size SetMinSize(wxSize(800,480)); SerializeFramePos(false); SetAcceleratorTable(m_pGISAcceleratorTable->GetAcceleratorTable()); SetApplication( this );// wxHtmlWindow *pHtmlText = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_DEFAULT_STYLE | wxBORDER_THEME);// pHtmlText->SetPage(wxT("<html><body><h1>Error</h1>Some error occurred :-H)</body></hmtl>"));// pHtmlText->Show(false);// RegisterChildWindow(pHtmlText->GetId());////#ifdef __WXGTK__// // wxGISToolBarMenu* pToolBarMenu = dynamic_cast<wxGISToolBarMenu*>(GetCommandBar(TOOLBARMENUNAME));// //if(pToolBarMenu)// // PushEventHandler(pToolBarMenu);//// m_pMenuBar->PushEventHandler(this);//#endif return true;}
开发者ID:Mileslee,项目名称:wxgis,代码行数:50,
示例5: END_EVENT_TABLEEND_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( PCB_BASE_FRAME* parent, const wxString& title, long style ) : EDA_BASE_FRAME( parent, DISPLAY3D_FRAME_TYPE, title, wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) ){ m_canvas = NULL; m_reloadRequest = false; m_ortho = false; // Give it an icon wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) ); SetIcon( icon ); GetSettings(); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); // Create the status line static const int dims[5] = { -1, 100, 100, 100, 140 }; CreateStatusBar( 5 ); SetStatusWidths( 5, dims ); CreateMenuBar(); ReCreateMainToolbar(); // Make a EDA_3D_CANVAS int attrs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; m_canvas = new EDA_3D_CANVAS( this, attrs ); m_auimgr.SetManagedWindow( this ); EDA_PANEINFO horiztb; horiztb.HorizontalToolbarPane(); m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiztb ).Name( wxT( "m_mainToolBar" ) ).Top() ); m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); m_auimgr.Update(); // Fixes bug in Windows (XP and possibly others) where the canvas requires the focus // in order to receive mouse events. Otherwise, the user has to click somewhere on // the canvas before it will respond to mouse wheel events. m_canvas->SetFocus();}
开发者ID:jerkey,项目名称:kicad,代码行数:50,
示例6: wxFrame// frame constructorMyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size){ SetIcon(wxICON(sample)); // create a menu bar wxMenu *menuFile = new wxMenu; menuFile->Append(Minimal_Open, _("Open.../tCtrl-O")); menuFile->AppendSeparator(); menuFile->Append(Minimal_PageSetup, _("Page &Setup")); menuFile->Append(Minimal_Preview, _("Print pre&view...")); menuFile->Append(Minimal_Print, _("Print.../tCtrl-P")); menuFile->AppendSeparator(); menuFile->Append(wxID_ABOUT, _("&About")); menuFile->AppendSeparator(); menuFile->Append(Minimal_Quit, _("&Exit")); wxMenu *menuFonts = new wxMenu; menuFonts->AppendRadioItem(Minimal_PrintSmall, _("&Small Printer Fonts")); menuFonts->AppendRadioItem(Minimal_PrintNormal, _("&Normal Printer Fonts")); menuFonts->AppendRadioItem(Minimal_PrintHuge, _("&Huge Printer Fonts")); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar; menuBar->Append(menuFile, _("&File")); menuBar->Append(menuFonts, _("F&onts")); // ... and attach this menu bar to the frame SetMenuBar(menuBar);#if wxUSE_STATUSBAR CreateStatusBar(1);#endif // wxUSE_STATUSBAR m_Html = new wxHtmlWindow(this); m_Html -> SetRelatedFrame(this, _("HTML : %s"));#if wxUSE_STATUSBAR m_Html -> SetRelatedStatusBar(0);#endif // wxUSE_STATUSBAR m_Name = wxT("test.htm"); m_Html -> LoadPage(m_Name); m_Prn = new wxHtmlEasyPrinting(_("Easy Printing Demo"), this); m_Prn -> SetHeader(m_Name + wxT("(@[email C++ CreateSurface函数代码示例 C++ CreateSolidBrush函数代码示例
|