您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxGetStockLabel函数代码示例

51自学网 2021-06-03 10:10:17
  C++
这篇教程C++ wxGetStockLabel函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxGetStockLabel函数的典型用法代码示例。如果您正苦于以下问题:C++ wxGetStockLabel函数的具体用法?C++ wxGetStockLabel怎么用?C++ wxGetStockLabel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxGetStockLabel函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: wxMenu

void SpectraMainFrame::InitMainMenu(void){	wxMenu* file_menu = new wxMenu();	file_menu->Append(wxID_OPEN);	file_menu->Append(		SpectraMainFrameID_GenerateDoc,		wxGetTranslation(wxT("&Generate/tCtrl-Shift-G"), wxT("Document"))	);	file_menu->AppendSeparator();	file_menu->Append(wxID_EXIT);	main_menu->Append(		file_menu,		wxGetStockLabel(wxID_FILE)	);	wxMenu* view_menu = new wxMenu();	renderer_menu = new wxMenu();	renderer_menu->AppendRadioItem(		SpectraMainFrameID_DefaultRenderer,		wxGetTranslation(wxT("&Default renderer"), wxT("Menu"))	);	renderer_menu->AppendRadioItem(		SpectraMainFrameID_XSectionRenderer,		wxGetTranslation(wxT("&Cross-section renderer"), wxT("Menu"))	);	view_menu->AppendSubMenu(		renderer_menu,		wxGetTranslation(wxT("&Renderer"), wxT("Menu"))	);	main_menu->Append(		view_menu,		wxGetTranslation(wxT("&View"), wxT("Menu"))	);	wxMenu* help_menu = new wxMenu();	help_menu->Append(wxID_ABOUT);	main_menu->Append(		help_menu,		wxGetStockLabel(wxID_HELP)	);	SetMenuBar(main_menu);}
开发者ID:BrainlessLabsInc,项目名称:oglplus,代码行数:49,


示例2: wxASSERT_MSG

wxMenuItem::wxMenuItem(wxMenu *pParentMenu,                       int id,                       const wxString& t,                       const wxString& strHelp,                       wxItemKind kind,                       wxMenu *pSubMenu)           :wxMenuItemBase(pParentMenu, id, t, strHelp, kind, pSubMenu){    wxASSERT_MSG( id != 0 || pSubMenu != NULL , wxT("A MenuItem ID of Zero does not work under Mac") ) ;    // In other languages there is no difference in naming the Exit/Quit menu item between MacOS and Windows guidelines    // therefore these item must not be translated    if (pParentMenu != NULL && !pParentMenu->GetNoEventsMode())        if ( wxStripMenuCodes(m_text).Upper() == wxT("EXIT") )            m_text = wxT("Quit/tCtrl+Q") ;    m_radioGroup.start = -1;    m_isRadioGroupStart = false;    wxString text = wxStripMenuCodes(m_text, (pParentMenu != NULL && pParentMenu->GetNoEventsMode()) ? wxStrip_Accel : wxStrip_All);    if (text.IsEmpty() && !IsSeparator())    {        wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?"));        text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC);    }    wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ;    // use accessors for ID and Kind because they might have been changed in the base constructor    m_peer = wxMenuItemImpl::Create( this, pParentMenu, GetId(), text, entry, strHelp, GetKind(), pSubMenu );    delete entry;}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:31,


示例3: wxCHECK_RET

void wxButton::SetLabel( const wxString &lbl ){    wxCHECK_RET( m_widget != NULL, wxT("invalid button") );    wxString label(lbl);    if (label.empty() && wxIsStockID(m_windowId))        label = wxGetStockLabel(m_windowId);    wxControl::SetLabel(label);    const wxString labelGTK = GTKConvertMnemonics(label);    if (wxIsStockID(m_windowId) && wxIsStockLabel(m_windowId, label))    {        const char *stock = wxGetStockGtkID(m_windowId);        if (stock)        {            gtk_button_set_label(GTK_BUTTON(m_widget), stock);            gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE);            return;        }    }    gtk_button_set_label(GTK_BUTTON(m_widget), wxGTK_CONV(labelGTK));    gtk_button_set_use_stock(GTK_BUTTON(m_widget), FALSE);    ApplyWidgetStyle( false );}
开发者ID:EdgarTx,项目名称:wx,代码行数:29,


示例4: label

bool wxButton::Create(wxWindow *parent,    wxWindowID id,    const wxString& lbl,    const wxPoint& pos,    const wxSize& size,    long style,    const wxValidator& validator,    const wxString& name){    wxString label(lbl);    if (label.empty() && wxIsStockID(id) && !(id == wxID_HELP))        label = wxGetStockLabel(id);    m_macIsUserPane = false ;    if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )        return false;    m_labelOrig = m_label = label ;        m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );    MacPostControlCreate( pos, size );    return true;}
开发者ID:jonntd,项目名称:dynamica,代码行数:26,


示例5: wxMenu

void wxExFrameWithHistory::FileHistoryPopupMenu(){  wxMenu* menu = new wxMenu();  for (int i = 0; i < m_FileHistory.GetCount(); i++)  {    const wxFileName file(m_FileHistory.GetHistoryFile(i));        if (file.FileExists())    {      wxMenuItem* item = new wxMenuItem(        menu,         wxID_FILE1 + i,         file.GetFullName());      item->SetBitmap(wxTheFileIconsTable->GetSmallImageList()->GetBitmap(        wxExGetIconID(file)));          menu->Append(item);    }  }    if (menu->GetMenuItemCount() > 0)  {    menu->AppendSeparator();    menu->Append(ID_CLEAR, wxGetStockLabel(wxID_CLEAR));          PopupMenu(menu);  }      delete menu;}
开发者ID:Emmavw,项目名称:wxExtension,代码行数:32,


示例6: wxCHECK_RET

void wxButton::SetLabel( const wxString &lbl ){    wxCHECK_RET( m_widget != NULL, wxT("invalid button") );    wxString label(lbl);    if (label.empty() && wxIsStockID(m_windowId))        label = wxGetStockLabel(m_windowId);    wxControl::SetLabel(label);#ifdef __WXGTK20__    if (wxIsStockID(m_windowId) && wxIsStockLabel(m_windowId, label))    {        const char *stock = wxGetStockGtkID(m_windowId);        if (stock)        {            gtk_button_set_label(GTK_BUTTON(m_widget), stock);            gtk_button_set_use_stock(GTK_BUTTON(m_widget), TRUE);            return;        }    }    wxString label2 = PrepareLabelMnemonics(label);    gtk_button_set_label(GTK_BUTTON(m_widget), wxGTK_CONV(label2));    gtk_button_set_use_stock(GTK_BUTTON(m_widget), FALSE);        ApplyWidgetStyle( false );    #else    gtk_label_set(GTK_LABEL(BUTTON_CHILD(m_widget)), wxGTK_CONV(GetLabel()));#endif}
开发者ID:gitrider,项目名称:wxsj2,代码行数:33,


示例7: wxGetStockLabel

void wxTopLevelWindowMSW::ButtonMenu::SetButton(int id, const wxString& label, wxMenu *subMenu){    m_assigned = true;    m_id = id;    if(label.empty() && wxIsStockID(id))        m_label = wxGetStockLabel(id, false);    else        m_label = label;    m_menu = subMenu;}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:10,


示例8: wxConvertMnemonicsToGTK

wxString wxMessageDialog::GetDefaultHelpLabel() const{#ifdef __WXGTK4__    return wxConvertMnemonicsToGTK(wxGetStockLabel(wxID_HELP));#else    wxGCC_WARNING_SUPPRESS(deprecated-declarations)    return GTK_STOCK_HELP;    wxGCC_WARNING_RESTORE()#endif}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:10,


示例9: AddWindowMenu

void wxAuiMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar){    if (pMenuBar && m_pWindowMenu)    {        int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,wxSTOCK_NOFLAGS));        if (pos == wxNOT_FOUND)            pMenuBar->Append(m_pWindowMenu, _("&Window"));        else            pMenuBar->Insert(pos, m_pWindowMenu, _("&Window"));    }}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:11,


示例10: wxMenu

void SpectraDocumentFrame::InitMainMenu(void){	wxMenu* file_menu = new wxMenu();	file_menu->Append(wxID_ADD, wxGetTranslation(wxT("New &view")));	file_menu->AppendSeparator();	file_menu->Append(wxID_CLOSE);	main_menu->Append(file_menu, wxGetStockLabel(wxID_FILE));	SetMenuBar(main_menu);}
开发者ID:detunized,项目名称:oglplus,代码行数:11,


示例11: wxASSERT_MSG

void wxMenuItemBase::SetText(const wxString& str){    m_text = str;    if ( m_text.empty() && !IsSeparator() )    {        wxASSERT_MSG( wxIsStockID(GetId()),                      wxT("A non-stock menu item with an empty label?") );        m_text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR |                                          wxSTOCK_WITH_MNEMONIC);    }}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:12,


示例12: QtCreate

bool wxButton::Create(wxWindow *parent, wxWindowID id,       const wxString& label,       const wxPoint& pos,       const wxSize& size, long style,       const wxValidator& validator,       const wxString& name ){         QtCreate(parent);    SetLabel( wxIsStockID( id ) ? wxGetStockLabel( id ) : label );    return QtCreateControl( parent, id, pos, size, style, validator, name );}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:12,


示例13: SetIcon

bool MainFrame::Create(wxDocManager* docManager, const wxString& title){    bool ok = wxDocMDIParentFrame::Create(docManager, NULL, wxID_ANY, title);    if (ok)    {        SetIcon(wxICON(text));        wxMenu* menu;                menu = new wxMenu();        menu->Append(wxID_NEW);        menu->Append(wxID_OPEN);        menu->AppendSeparator();        menu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT) + wxT("/t") + _("Ctrl+Q"));        docManager->FileHistoryUseMenu(menu);        docManager->FileHistoryLoad(*wxConfig::Get());        wxMenuBar* menubar = new wxMenuBar();        menubar->Append(menu, wxGetStockLabel(wxID_FILE));        menu = new wxMenu();        menu->Append(wxID_ABOUT, wxGetStockLabel(wxID_ABOUT) + wxT("/t") + _("Shift+F1"));        menubar->Append(menu, wxGetStockLabel(wxID_HELP));        SetMenuBar(menubar);        CreateStatusBar();    #ifdef _WX_PERSIST_H_        if (!wxPersistentRegisterAndRestore(this, wxT("Main")))    #endif        {            wxFrame_SetInitialPosition(this);        }        this->Connect(wxEVT_CLOSE_WINDOW,                      wxCloseEventHandler(MainFrame::OnCloseWindow));    }    return ok;}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:40,


示例14: wxFrame

BombsFrame::BombsFrame(BombsGame *game)    : wxFrame(NULL, wxID_ANY, wxT("wxBombs"), wxDefaultPosition,        wxSize(300, 300), wxDEFAULT_DIALOG_STYLE|wxMINIMIZE_BOX){    m_game = game;    m_easyCorner = false;    m_lastLevel = bombsID_EASY;    SetIcon(wxICON(bombs));#if wxUSE_STATUSBAR    CreateStatusBar();#endif    // Create a menu bar for the frame    wxMenuBar *menuBar = new wxMenuBar;    wxMenu *menuFile = new wxMenu;    wxMenu *menuLevel = new wxMenu;    menuLevel->AppendRadioItem(bombsID_EASY, wxT("&Easy (10x10)/tCtrl-1"));    menuLevel->AppendRadioItem(bombsID_MEDIUM, wxT("&Medium (15x15)/tCtrl-2"));    menuLevel->AppendRadioItem(bombsID_HARD, wxT("&Hard (25x20)/tCtrl-3"));    menuFile->Append(wxID_NEW, wxT("&New game/tCtrl-N"));    menuFile->Append(bombsID_LEVEL, wxT("&Level"),menuLevel, wxT("Starts a new game"));    menuFile->AppendCheckItem(bombsID_EASYCORNER, wxT("&Easy corner"));    menuFile->AppendSeparator();    menuFile->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT), wxT("Quits the application"));    menuBar->Append(menuFile, wxT("&File"));    wxMenu *menuHelp = new wxMenu;    menuHelp->Append(wxID_ABOUT, wxT("&About"),        wxT("Displays the program information") );    menuBar->Append(menuHelp, wxT("&Help"));    SetMenuBar(menuBar);    // Create child subwindows.    m_canvas = new BombsCanvas(this, m_game);    // Ensure the subwindows get resized o.k.    //  OnSize(width, height);    // Centre frame on the screen.    Centre(wxBOTH);    // Show the frame.    Show();}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:52,


示例15: DIALOG_YES_NO_CANCEL

    DIALOG_YES_NO_CANCEL( wxWindow        *aParent,                          const wxString& aPrimaryMessage,                          const wxString& aSecondaryMessage = wxEmptyString,                          const wxString& aYesButtonText = wxEmptyString,                          const wxString& aNoButtonText = wxEmptyString,                          const wxString& aCancelButtonText = wxEmptyString ) :        DIALOG_EXIT( aParent, aSecondaryMessage )    {        m_TextInfo->SetLabel( aPrimaryMessage );        if( aSecondaryMessage.IsEmpty() )            m_staticText2->Hide();        m_buttonSaveAndExit->SetLabel( aYesButtonText.IsEmpty() ? wxGetStockLabel( wxID_YES ) :                                       aYesButtonText );        m_buttonExitNoSave->SetLabel( aNoButtonText.IsEmpty() ? wxGetStockLabel( wxID_NO ) :                                      aNoButtonText );        m_buttonCancel->SetLabel( aCancelButtonText.IsEmpty() ? wxGetStockLabel( wxID_CANCEL ) :                                  aCancelButtonText );        GetSizer()->Fit( this );        GetSizer()->SetSizeHints( this );    };
开发者ID:CastMi,项目名称:kicad-source-mirror,代码行数:22,


示例16: label

bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,                      const wxPoint& pos,                      const wxSize& size, long style,                      const wxValidator& validator,                      const wxString& name){    wxString label(lbl);    if (label.empty() && wxIsStockID(id))        label = wxGetStockLabel(id);    if( !CreateControl( parent, id, pos, size, style, validator, name ) )        return false;    wxXmString text( GetLabelText(label) );    Widget parentWidget = (Widget) parent->GetClientWidget();    /*    * Patch Note (important)    * There is no major reason to put a defaultButtonThickness here.    * Not requesting it give the ability to put wxButton with a spacing    * as small as requested. However, if some button become a DefaultButton,    * other buttons are no more aligned -- This is why we set    * defaultButtonThickness of ALL buttons belonging to the same wxPanel,    * in the ::SetDefaultButton method.    */    m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",        xmPushButtonWidgetClass,        parentWidget,        wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),        XmNlabelString, text(),        XmNrecomputeSize, False,        // See comment for wxButton::SetDefault        // XmNdefaultButtonShadowThickness, 1,        NULL);    XtAddCallback ((Widget) m_mainWidget,                   XmNactivateCallback, (XtCallbackProc) wxButtonCallback,                   (XtPointer) this);    wxSize best = GetBestSize();    if( size.x != -1 ) best.x = size.x;    if( size.y != -1 ) best.y = size.y;    AttachWidget (parent, m_mainWidget, (WXWidget) NULL,                  pos.x, pos.y, best.x, best.y);    ChangeBackgroundColour();    return true;}
开发者ID:hgwells,项目名称:tive,代码行数:51,


示例17: DontCreatePeer

bool wxButton::Create(wxWindow *parent,    wxWindowID id,    const wxString& labelOrig,    const wxPoint& pos,    const wxSize& size,    long style,    const wxValidator& validator,    const wxString& name){    DontCreatePeer();        m_marginX =    m_marginY = 0;    // FIXME: this hack is needed because we're called from    //        wxBitmapButton::Create() with this style and we currently use a    //        different wxWidgetImpl method (CreateBitmapButton() rather than    //        CreateButton()) for creating bitmap buttons, but we really ought    //        to unify the creation of buttons of all kinds and then remove    //        this check    if ( style & wxBU_NOTEXT )    {        return wxControl::Create(parent, id, pos, size, style,                                 validator, name);    }    wxString label;    // Ignore the standard label for help buttons if possible, they use "?"    // label under Mac which looks better.    if ( !IsHelpButtonWithStandardLabel(id, labelOrig) )    {        label = labelOrig.empty() && wxIsStockID(id) ? wxGetStockLabel(id)                                                     : labelOrig;    }    if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )        return false;    m_labelOrig =    m_label = label ;    SetPeer(wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() ));    MacPostControlCreate( pos, size );    return true;}
开发者ID:madnessw,项目名称:thesnow,代码行数:49,


示例18: AddWindowMenu

void wxGenericMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar){    if (pMenuBar && m_windowMenu)    {        int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,false));        if (pos == wxNOT_FOUND)        {            pMenuBar->Append(m_windowMenu, _("&Window"));        }        else        {            pMenuBar->Insert(pos, m_windowMenu, _("&Window"));        }    }}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:15,


示例19: wxCHECK_RET

void wxButton::SetLabel( const wxString &lbl ){    wxCHECK_RET( m_widget != NULL, wxT("invalid button") );    wxString label(lbl);    if (label.empty() && wxIsStockID(m_windowId))        label = wxGetStockLabel(m_windowId);    wxControl::SetLabel(label);    const wxString labelGTK = GTKRemoveMnemonics(label);    gtk_label_set(GTK_LABEL(BUTTON_CHILD(m_widget)), wxGTK_CONV(labelGTK));}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:15,


示例20: wxQtToggleButton

bool wxToggleButton::Create(wxWindow *parent,            wxWindowID id,            const wxString& label,            const wxPoint& pos,            const wxSize& size, long style,            const wxValidator& validator,            const wxString& name){    // create a checkable push button    m_qtPushButton = new wxQtToggleButton( parent, this );    // this button is toggleable and has a text label    SetLabel( wxIsStockID( id ) ? wxGetStockLabel( id ) : label );    return QtCreateControl( parent, id, pos, size, style, validator, name );}
开发者ID:vslavik,项目名称:wxWidgets,代码行数:16,


示例21: wxStripMenuCodes

void wxMenuItem::UpdateItemText(){    if ( !m_parentMenu )        return ;    wxString text = wxStripMenuCodes(m_text, m_parentMenu != NULL && m_parentMenu->GetNoEventsMode() ? wxStrip_Accel : wxStrip_All);    if (text.IsEmpty() && !IsSeparator())    {        wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?"));        text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC);    }    wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ;    GetPeer()->SetLabel( text, entry );    delete entry ;}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:16,


示例22: wxIsStockLabel

bool wxIsStockLabel(wxWindowID id, const wxString& label){    if (label.empty())        return true;    wxString stock = wxGetStockLabel(id);    if (label == stock)        return true;    stock.Replace(wxT("&"), wxEmptyString);    if (label == stock)        return true;    return false;}
开发者ID:Anonymous2,项目名称:project64,代码行数:16,


示例23: label

bool wxButton::Create(wxWindow *parent,                      wxWindowID id,                      const wxString& lbl,                      const wxPoint& pos,                      const wxSize& size,                      long style,                      const wxValidator& validator,                      const wxString& name){    wxString label(lbl);    if (label.empty() && wxIsStockID(id))    {        // On Windows, some buttons aren't supposed to have        // mnemonics, so strip them out.                label = wxGetStockLabel(id #if defined(__WXMSW__) || defined(__WXWINCE__)                                        , ( id != wxID_OK &&                                            id != wxID_CANCEL &&                                            id != wxID_CLOSE )#endif                                );     }        if ( !CreateControl(parent, id, pos, size, style, validator, name) )        return false;    WXDWORD exstyle;    WXDWORD msStyle = MSWGetStyle(style, &exstyle);#ifdef __WIN32__    // if the label contains several lines we must explicitly tell the button    // about it or it wouldn't draw it correctly ("/n"s would just appear as    // black boxes)    //    // NB: we do it here and not in MSWGetStyle() because we need the label    //     value and m_label is not set yet when MSWGetStyle() is called;    //     besides changing BS_MULTILINE during run-time is pointless anyhow    if ( label.find(_T('/n')) != wxString::npos )    {        msStyle |= BS_MULTILINE;    }#endif // __WIN32__    return MSWCreateControl(_T("BUTTON"), msStyle, pos, size, label, exstyle);}
开发者ID:gitrider,项目名称:wxsj2,代码行数:46,


示例24: label

bool wxButton::Create(wxWindow *parent,                      wxWindowID id,                      const wxBitmap& bitmap,                      const wxString &lbl,                      const wxPoint &pos,                      const wxSize &size,                      long style,                      const wxValidator& validator,                      const wxString &name){    wxString label(lbl);    if (label.empty() && wxIsStockID(id))        label = wxGetStockLabel(id);    long ctrl_style = style & ~wxBU_ALIGN_MASK;    ctrl_style = ctrl_style & ~wxALIGN_MASK;    if((style & wxBU_RIGHT) == wxBU_RIGHT)        ctrl_style |= wxALIGN_RIGHT;    else if((style & wxBU_LEFT) == wxBU_LEFT)        ctrl_style |= wxALIGN_LEFT;    else        ctrl_style |= wxALIGN_CENTRE_HORIZONTAL;    if((style & wxBU_TOP) == wxBU_TOP)        ctrl_style |= wxALIGN_TOP;    else if((style & wxBU_BOTTOM) == wxBU_BOTTOM)        ctrl_style |= wxALIGN_BOTTOM;    else        ctrl_style |= wxALIGN_CENTRE_VERTICAL;    if ( !wxControl::Create(parent, id, pos, size, ctrl_style, validator, name) )        return false;    SetLabel(label);    if (bitmap.IsOk())        SetBitmap(bitmap); // SetInitialSize called by SetBitmap()    else        SetInitialSize(size);    CreateInputHandler(wxINP_HANDLER_BUTTON);    return true;}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:45,


示例25: InvalidateBestSize

GtkWidget *wxInfoBar::GTKAddButton(wxWindowID btnid, const wxString& label){    // as GTK+ lays out the buttons vertically, adding another button changes    // our best size (at least in vertical direction)    InvalidateBestSize();    GtkWidget* button = gtk_info_bar_add_button(GTK_INFO_BAR(m_widget),#ifdef __WXGTK4__        wxGTK_CONV(label.empty() ? wxConvertMnemonicsToGTK(wxGetStockLabel(btnid)) : label),#else        label.empty() ? wxGetStockGtkID(btnid) : static_cast<const char*>(wxGTK_CONV(label)),#endif        btnid);    wxASSERT_MSG( button, "unexpectedly failed to add button to info bar" );    return button;}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:18,



注:本文中的wxGetStockLabel函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wxGetTextFromUser函数代码示例
C++ wxGetOsVersion函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。