当前位置: 首页>>代码示例>>C++>>正文


C++ wxCommandEventHandler函数代码示例

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


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

示例1: wxDialog


//.........这里部分代码省略.........
    m_textCtrlExtends->SetHint(wxT(""));
    #endif
    
    flexGridSizer10->Add(m_textCtrlExtends, 0, wxALL|wxEXPAND, 5);
    
    m_button90 = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    m_button90->SetToolTip(_("Edit in a small text editor..."));
    
    flexGridSizer10->Add(m_button90, 0, wxALL, 5);
    
    m_staticText78 = new wxStaticText(this, wxID_ANY, _("Implements:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer10->Add(m_staticText78, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlImplements = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlImplements->SetToolTip(_("A comma separated list of interfaces for this class"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlImplements->SetHint(wxT(""));
    #endif
    
    flexGridSizer10->Add(m_textCtrlImplements, 0, wxALL|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button92 = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    m_button92->SetToolTip(_("Edit in a small text editor..."));
    
    flexGridSizer10->Add(m_button92, 0, wxALL, 5);
    
    wxStaticBoxSizer* staticBoxSizer40 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Options:")), wxVERTICAL);
    
    boxSizer2->Add(staticBoxSizer40, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* flexGridSizer46 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer46->SetFlexibleDirection( wxBOTH );
    flexGridSizer46->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer46->AddGrowableCol(0);
    flexGridSizer46->AddGrowableCol(1);
    
    staticBoxSizer40->Add(flexGridSizer46, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_checkBoxCtor = new wxCheckBox(this, wxID_ANY, _("Generate consturctor"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxCtor->SetValue(true);
    
    flexGridSizer46->Add(m_checkBoxCtor, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxDtor = new wxCheckBox(this, wxID_ANY, _("Generate desctructor"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxDtor->SetValue(false);
    
    flexGridSizer46->Add(m_checkBoxDtor, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxFolderPerNamespace = new wxCheckBox(this, wxID_ANY, _("Create folder per namespace"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxFolderPerNamespace->SetValue(false);
    
    flexGridSizer46->Add(m_checkBoxFolderPerNamespace, 0, wxALL, 5);
    
    m_checkBoxSingleton = new wxCheckBox(this, wxID_ANY, _("Make singleton (available for classes only)"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxSingleton->SetValue(false);
    m_checkBoxSingleton->SetToolTip(_("The generated class will be generated as a singleton\nclass"));
    
    flexGridSizer46->Add(m_checkBoxSingleton, 0, wxALL, 5);
    
    boxSizer2->Add(0, 0, 1, wxALL, 5);
    
    wxBoxSizer* boxSizer4 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer2->Add(boxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_buttonOK->SetDefault();
    
    boxSizer4->Add(m_buttonOK, 0, wxALL, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer4->Add(m_buttonCancel, 0, wxALL, 5);
    
    SetName(wxT("NewPHPClassBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_textCtrlClassName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NewPHPClassBase::OnClassNameUpdate), NULL, this);
    m_textCtrlNamespace->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NewPHPClassBase::OnNamespaceTextUpdated), NULL, this);
    m_button90->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewPHPClassBase::OnEditExtends), NULL, this);
    m_button92->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewPHPClassBase::OnEditImplements), NULL, this);
    m_checkBoxCtor->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnMakeSingletonUI), NULL, this);
    m_checkBoxDtor->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnMakeSingletonUI), NULL, this);
    m_checkBoxFolderPerNamespace->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NewPHPClassBase::OnFolderPerNamespace), NULL, this);
    m_checkBoxSingleton->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnMakeSingletonUI), NULL, this);
    m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewPHPClassBase::OnOKUI), NULL, this);
    
}
开发者ID:292388900,项目名称:codelite,代码行数:101,代码来源:new_class.cpp

示例2: wxPanel

LayersEditorPanelBase::LayersEditorPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCraftergfm8VaInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    m_auimgr = new wxAuiManager;
    m_auimgr->SetManagedWindow( this );
    m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING);
    m_auimgr->GetArtProvider()->SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 0);
    m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
    
    m_toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_toolbar->SetToolBitmapSize(wxSize(16,16));
    
    m_auimgr->AddPane(m_toolbar, wxAuiPaneInfo().Caption(_("Layers editor")).Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
    
    m_toolbar->AddTool(ADD_LAYER_TOOL, _("Add a layer"), wxXmlResource::Get()->LoadBitmap(wxT("add16")), wxNullBitmap, wxITEM_NORMAL, _("Add a new layer"), wxT(""), NULL);
    
    m_toolbar->AddTool(DELETE_LAYER_TOOL, _("Delete the selected layer"), wxXmlResource::Get()->LoadBitmap(wxT("delete16")), wxNullBitmap, wxITEM_NORMAL, _("Delete the selected layer"), wxT(""), NULL);
    
    m_toolbar->AddSeparator();
    
    m_toolbar->AddTool(EDIT_LAYER_TOOL, _("Edit the properties of the layer"), wxXmlResource::Get()->LoadBitmap(wxT("properties16")), wxNullBitmap, wxITEM_NORMAL, _("Edit the properties of the layer"), wxT(""), NULL);
    
    m_toolbar->AddTool(LAYER_UP_TOOL, _("Move the layer over"), wxXmlResource::Get()->LoadBitmap(wxT("up16")), wxNullBitmap, wxITEM_NORMAL, _("Move the layer over"), wxT(""), NULL);
    
    m_toolbar->AddTool(LAYER_DOWN_TOOL, _("Move the layer below"), wxXmlResource::Get()->LoadBitmap(wxT("down16")), wxNullBitmap, wxITEM_NORMAL, _("Move the layer below"), wxT(""), NULL);
    
    m_toolbar->AddSeparator();
    
    m_toolbar->AddTool(REFRESH_TOOL, _("Refresh the list"), wxXmlResource::Get()->LoadBitmap(wxT("refreshicon")), wxNullBitmap, wxITEM_NORMAL, _("Refresh the list"), wxT(""), NULL);
    
    m_toolbar->AddSeparator();
    
    m_toolbar->AddTool(HELP_TOOL, _("Help"), wxXmlResource::Get()->LoadBitmap(wxT("help16")), wxNullBitmap, wxITEM_NORMAL, _("Display help about the layers editor"), wxT(""), NULL);
    m_toolbar->Realize();
    
    m_panel715 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    m_auimgr->AddPane(m_panel715, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
    m_auimgr->Update();
    
    wxFlexGridSizer* flexGridSizer1316 = new wxFlexGridSizer(1, 1, 0, 0);
    flexGridSizer1316->SetFlexibleDirection( wxBOTH );
    flexGridSizer1316->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer1316->AddGrowableCol(0);
    flexGridSizer1316->AddGrowableRow(0);
    m_panel715->SetSizer(flexGridSizer1316);
    
    m_layersList = new wxListCtrl(m_panel715, LAYERS_LIST_ID, wxDefaultPosition, wxDefaultSize, wxLC_REPORT);
    flexGridSizer1316->Add(m_layersList, 0, wxALL|wxEXPAND, 0);
    
    SetName(wxT("LayersEditorPanelBase"));
    SetSize(500,300);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    // Connect events
    this->Connect(ADD_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnAddLayerClicked), NULL, this);
    this->Connect(DELETE_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnDeleteLayerClicked), NULL, this);
    this->Connect(EDIT_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnEditLayerClicked), NULL, this);
    this->Connect(LAYER_UP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerUpClicked), NULL, this);
    this->Connect(LAYER_DOWN_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerDownClicked), NULL, this);
    this->Connect(REFRESH_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnRefreshClicked), NULL, this);
    this->Connect(HELP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnHelpClicked), NULL, this);
    
}
开发者ID:UNIVERSAL-IT-SYSTEMS,项目名称:GD,代码行数:72,代码来源:GDIDEDialogs.cpp

示例3: wxPanel


//.........这里部分代码省略.........
    
    fgSizer1->Add(m_checkBoxDoubleQuotes, 0, wxALL, 5);
    
    wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Whitespaces:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer1, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(  0, 2, 0, 0);
    fgSizer3->SetFlexibleDirection( wxBOTH );
    fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer3->AddGrowableCol(1);
    
    sbSizer1->Add(fgSizer3, 1, wxEXPAND, 5);
    
    m_staticText2 = new wxStaticText(this, wxID_ANY, _("Whitespace visibility:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_whitespaceStyleArr;
    m_whitespaceStyle = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_whitespaceStyleArr, 0);
    
    fgSizer3->Add(m_whitespaceStyle, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("EOL Mode:"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_staticText4->SetToolTip(_("Set the editor's EOL mode (End Of Line)"));
    
    fgSizer3->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceEOLArr;
    m_choiceEOL = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEOLArr, 0);
    m_choiceEOL->SetToolTip(_("Set the editor's EOL mode (End Of Line). When set to 'Default' CodeLite will set the EOL according to the hosting OS"));
    
    fgSizer3->Add(m_choiceEOL, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    wxStaticBoxSizer* sbSizer2 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Caret line:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer2, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer(  3, 2, 0, 0);
    fgSizer2->SetFlexibleDirection( wxBOTH );
    fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer2->AddGrowableCol(1);
    
    sbSizer2->Add(fgSizer2, 0, wxALL|wxEXPAND, 5);
    
    m_highlightCaretLine = new wxCheckBox(this, wxID_ANY, _("Highlight caret line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_highlightCaretLine->SetValue(false);
    m_highlightCaretLine->SetToolTip(_("Highlight the caret line"));
    
    fgSizer2->Add(m_highlightCaretLine, 0, wxRIGHT|wxTOP|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer2->Add(0, 0, 1, wxEXPAND, 5);
    
    m_staticText1 = new wxStaticText(this, wxID_ANY, _("Caret line background colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer2->Add(m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_caretLineColourPicker = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_SHOW_LABEL|wxCLRP_DEFAULT_STYLE);
    
    fgSizer2->Add(m_caretLineColourPicker, 0, wxALL|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxStaticBoxSizer* sbSizer4 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Debugger Marker:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer4, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer4 = new wxFlexGridSizer(  0, 2, 0, 0);
    fgSizer4->SetFlexibleDirection( wxBOTH );
    fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer4->AddGrowableCol(1);
    
    sbSizer4->Add(fgSizer4, 0, wxEXPAND, 5);
    
    m_checkBoxMarkdebuggerLine = new wxCheckBox(this, wxID_ANY, _("Highlight debugger line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxMarkdebuggerLine->SetValue(false);
    
    fgSizer4->Add(m_checkBoxMarkdebuggerLine, 0, wxALL, 5);
    
    fgSizer4->Add(0, 0, 1, wxEXPAND, 5);
    
    m_staticText41 = new wxStaticText(this, wxID_ANY, _("Debugger line colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer4->Add(m_staticText41, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_colourPickerDbgLine = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_SHOW_LABEL|wxCLRP_DEFAULT_STYLE);
    
    fgSizer4->Add(m_colourPickerDbgLine, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_highlightCaretLine->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(EditorOptionsGeneralGuidesPanelBase::OnHighlightCaretLine), NULL, this);
    m_staticText1->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnhighlightCaretLineUI), NULL, this);
    m_caretLineColourPicker->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnhighlightCaretLineUI), NULL, this);
    m_staticText41->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnDebuggerLineUI), NULL, this);
    m_colourPickerDbgLine->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnDebuggerLineUI), NULL, this);
    
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:101,代码来源:editoroptionsgeneralguidespanelbase.cpp

示例4: KIWAY_PLAYER


//.........这里部分代码省略.........
	m_staticTextBPP->Wrap( -1 );
	fgSizerInfo->Add( m_staticTextBPP, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_BPPValue = new wxStaticText( m_panelRight, wxID_ANY, _("0000"), wxDefaultPosition, wxDefaultSize, 0 );
	m_BPPValue->Wrap( -1 );
	fgSizerInfo->Add( m_BPPValue, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
	
	m_BPPunits = new wxStaticText( m_panelRight, wxID_ANY, _("bits"), wxDefaultPosition, wxDefaultSize, 0 );
	m_BPPunits->Wrap( -1 );
	fgSizerInfo->Add( m_BPPunits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	fgSizerInfo->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticTextBPI = new wxStaticText( m_panelRight, wxID_ANY, _("Resolution:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextBPI->Wrap( -1 );
	fgSizerInfo->Add( m_staticTextBPI, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_DPIValueX = new wxTextCtrl( m_panelRight, wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 );
	m_DPIValueX->SetMinSize( wxSize( 40,-1 ) );
	
	fgSizerInfo->Add( m_DPIValueX, 0, wxBOTTOM|wxRIGHT, 5 );
	
	m_DPIValueY = new wxTextCtrl( m_panelRight, wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 );
	m_DPIValueY->SetMinSize( wxSize( 40,-1 ) );
	
	fgSizerInfo->Add( m_DPIValueY, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
	
	m_DPI_Units = new wxStaticText( m_panelRight, wxID_ANY, _("DPI"), wxDefaultPosition, wxDefaultSize, 0 );
	m_DPI_Units->Wrap( -1 );
	fgSizerInfo->Add( m_DPI_Units, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
	
	
	sbSizerInfo->Add( fgSizerInfo, 0, wxEXPAND|wxBOTTOM, 5 );
	
	
	brightSizer->Add( sbSizerInfo, 0, wxEXPAND|wxALL, 5 );
	
	m_buttonLoad = new wxButton( m_panelRight, wxID_ANY, _("Load Bitmap"), wxDefaultPosition, wxDefaultSize, 0 );
	brightSizer->Add( m_buttonLoad, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	m_buttonExport = new wxButton( m_panelRight, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonExport->SetToolTip( _("Create a library file for Eeschema\nThis library contains only one component: logo") );
	
	brightSizer->Add( m_buttonExport, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	wxString m_radioBoxFormatChoices[] = { _("Eeschema (.lib file)"), _("Pcbnew (.kicad_mod file)"), _("Postscript (.ps file)"), _("Logo for title block (.kicad_wks file)") };
	int m_radioBoxFormatNChoices = sizeof( m_radioBoxFormatChoices ) / sizeof( wxString );
	m_radioBoxFormat = new wxRadioBox( m_panelRight, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_radioBoxFormatNChoices, m_radioBoxFormatChoices, 1, wxRA_SPECIFY_COLS );
	m_radioBoxFormat->SetSelection( 1 );
	brightSizer->Add( m_radioBoxFormat, 0, wxEXPAND|wxALL, 5 );
	
	wxString m_rbOptionsChoices[] = { _("Normal"), _("Negative") };
	int m_rbOptionsNChoices = sizeof( m_rbOptionsChoices ) / sizeof( wxString );
	m_rbOptions = new wxRadioBox( m_panelRight, wxID_ANY, _("Options"), wxDefaultPosition, wxDefaultSize, m_rbOptionsNChoices, m_rbOptionsChoices, 1, wxRA_SPECIFY_COLS );
	m_rbOptions->SetSelection( 0 );
	brightSizer->Add( m_rbOptions, 0, wxEXPAND|wxALL, 5 );
	
	m_ThresholdText = new wxStaticText( m_panelRight, wxID_ANY, _("Threshold Value:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_ThresholdText->Wrap( -1 );
	brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_sliderThreshold = new wxSlider( m_panelRight, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
	m_sliderThreshold->SetToolTip( _("Adjust the level to convert the greyscale picture to a black and white picture.") );
	
	brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	wxString m_radio_PCBLayerChoices[] = { _("Front silk screen"), _("Front solder mask"), _("User layer Eco1"), _("User Layer Eco2") };
	int m_radio_PCBLayerNChoices = sizeof( m_radio_PCBLayerChoices ) / sizeof( wxString );
	m_radio_PCBLayer = new wxRadioBox( m_panelRight, wxID_ANY, _("Board Layer for Outline:"), wxDefaultPosition, wxDefaultSize, m_radio_PCBLayerNChoices, m_radio_PCBLayerChoices, 1, wxRA_SPECIFY_COLS );
	m_radio_PCBLayer->SetSelection( 0 );
	m_radio_PCBLayer->SetToolTip( _("Choose the board layer to place the outline.\nThe 2 invisible fields reference and value are always placed on the silk screen layer.") );
	
	brightSizer->Add( m_radio_PCBLayer, 0, wxALL|wxEXPAND, 5 );
	
	
	m_panelRight->SetSizer( brightSizer );
	m_panelRight->Layout();
	brightSizer->Fit( m_panelRight );
	bMainSizer->Add( m_panelRight, 0, wxEXPAND, 0 );
	
	
	this->SetSizer( bMainSizer );
	this->Layout();
	m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	
	// Connect Events
	m_InitialPicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
	m_GreyscalePicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
	m_BNPicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
	m_DPIValueX->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueX ), NULL, this );
	m_DPIValueX->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this );
	m_DPIValueY->Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueY ), NULL, this );
	m_DPIValueY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this );
	m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnLoadFile ), NULL, this );
	m_buttonExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnExport ), NULL, this );
	m_radioBoxFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnFormatChange ), NULL, this );
	m_rbOptions->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnOptionsSelection ), NULL, this );
	m_sliderThreshold->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( BM2CMP_FRAME_BASE::OnThresholdChange ), NULL, this );
}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:101,代码来源:bitmap2cmp_gui_base.cpp

示例5: GetClientSize

//
// Initialize after parent etc. set
//
void wxPropertyGridManager::Init2( int style )
{

    if ( m_iFlags & wxPG_FL_INITIALIZED )
        return;

    m_windowStyle |= (style&0x0000FFFF);

    wxSize csz = GetClientSize();

    m_cursorSizeNS = wxCursor(wxCURSOR_SIZENS);

    // Prepare the first page
    // NB: But just prepare - you still need to call Add/InsertPage
    //     to actually add properties on it.
    wxPropertyGridPage* pd = new wxPropertyGridPage();
    pd->m_isDefault = true;
    pd->m_manager = this;
    wxPropertyGridState* state = pd->GetStatePtr();
    state->m_pPropGrid = m_pPropGrid;
    m_arrPages.Add( (void*)pd );
    m_pPropGrid->m_pState = state;

    wxWindowID baseId = GetId();
    wxWindowID useId = baseId;
    if ( baseId < 0 )
        baseId = wxPG_MAN_ALTERNATE_BASE_ID;

#ifdef __WXMAC__
   // Smaller controls on Mac
   SetWindowVariant(wxWINDOW_VARIANT_SMALL);
#endif 

    // Create propertygrid.
    m_pPropGrid->Create(this,baseId,wxPoint(0,0),csz,
                        (m_windowStyle&wxPG_MAN_PASS_FLAGS_MASK)
                            |wxPG_MAN_PROPGRID_FORCED_FLAGS);

    m_pPropGrid->m_eventObject = this;

    m_pPropGrid->SetId(useId);

    m_pPropGrid->m_iFlags |= wxPG_FL_IN_MANAGER;

    m_pState = m_pPropGrid->m_pState;

    m_pPropGrid->SetExtraStyle(wxPG_EX_INIT_NOCAT);

    m_nextTbInd = baseId+ID_ADVTBITEMSBASE_OFFSET + 2;


#ifndef __WXPYTHON__
    // Connect to property grid onselect event.
    // NB: Even if wxID_ANY is used, this doesn't connect properly in wxPython
    //     (see wxPropertyGridManager::ProcessEvent).
    Connect(m_pPropGrid->GetId()/*wxID_ANY*/,
            wxEVT_PG_SELECTED,
            wxPropertyGridEventHandler(wxPropertyGridManager::OnPropertyGridSelect) );
#endif

    // Connect to toolbar button events.
    Connect(baseId+ID_ADVTBITEMSBASE_OFFSET,baseId+ID_ADVTBITEMSBASE_OFFSET+50,
            wxEVT_COMMAND_TOOL_CLICKED,
            wxCommandEventHandler(wxPropertyGridManager::OnToolbarClick) );

    // Optional initial controls.
    m_width = -12345;

    m_iFlags |= wxPG_FL_INITIALIZED;

}
开发者ID:cubemoon,项目名称:game-editor,代码行数:74,代码来源:manager.cpp

示例6: KIWAY_PLAYER


//.........这里部分代码省略.........
	
	m_sizer8->Add( bSizer81, 0, wxEXPAND, 5 );
	
	
	m_sizer8->Add( 0, 0, 1, wxEXPAND, 5 );
	
	
	m_welcomePanel->SetSizer( m_sizer8 );
	m_welcomePanel->Layout();
	m_sizer8->Fit( m_welcomePanel );
	m_plotNotebook->AddPage( m_welcomePanel, _("a page"), false, wxNullBitmap );
	
	m_sizer5->Add( m_plotNotebook, 1, wxEXPAND | wxALL, 5 );
	
	
	m_plotPanel->SetSizer( m_sizer5 );
	m_plotPanel->Layout();
	m_sizer5->Fit( m_plotPanel );
	m_panel5 = new wxPanel( m_splitterConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sizer13 = new wxBoxSizer( wxVERTICAL );
	
	m_simConsole = new wxTextCtrl( m_panel5, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
	m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
	
	m_sizer13->Add( m_simConsole, 1, wxALL|wxEXPAND, 5 );
	
	
	m_panel5->SetSizer( m_sizer13 );
	m_panel5->Layout();
	m_sizer13->Fit( m_panel5 );
	m_splitterConsole->SplitHorizontally( m_plotPanel, m_panel5, 500 );
	m_sizer11->Add( m_splitterConsole, 1, wxEXPAND, 5 );
	
	
	m_panel2->SetSizer( m_sizer11 );
	m_panel2->Layout();
	m_sizer11->Fit( m_panel2 );
	m_sidePanel = new wxPanel( m_splitterPlot, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_sideSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer1;
	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Signals") ), wxVERTICAL );
	
	m_signals = new wxListView( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON );
	sbSizer1->Add( m_signals, 1, wxALL|wxEXPAND, 5 );
	
	
	m_sideSizer->Add( sbSizer1, 1, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer3;
	sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Cursors") ), wxVERTICAL );
	
	m_cursors = new wxListCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
	sbSizer3->Add( m_cursors, 1, wxALL|wxEXPAND, 5 );
	
	
	m_sideSizer->Add( sbSizer3, 1, wxEXPAND, 5 );
	
	sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Tune") ), wxVERTICAL );
	
	m_tuneSizer = new wxBoxSizer( wxHORIZONTAL );
	
	
	sbSizer4->Add( m_tuneSizer, 1, wxEXPAND, 5 );
	
	
	m_sideSizer->Add( sbSizer4, 1, wxEXPAND, 5 );
	
	
	m_sidePanel->SetSizer( m_sideSizer );
	m_sidePanel->Layout();
	m_sideSizer->Fit( m_sidePanel );
	m_splitterPlot->SplitVertically( m_panel2, m_sidePanel, 700 );
	m_sizer1->Add( m_splitterPlot, 1, wxEXPAND, 5 );
	
	
	this->SetSizer( m_sizer1 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( m_newPlot->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuNewPlot ) );
	this->Connect( m_openWorkbook->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuOpenWorkbook ) );
	this->Connect( m_saveWorkbook->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveWorkbook ) );
	this->Connect( m_saveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveImage ) );
	this->Connect( m_saveCsv->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuSaveCsv ) );
	this->Connect( m_exitSim->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuExit ) );
	this->Connect( m_zoomIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomIn ) );
	this->Connect( m_zoomOut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomOut ) );
	this->Connect( m_zoomFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuZoomFit ) );
	this->Connect( m_showGrid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowGrid ) );
	this->Connect( m_showGrid->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowGridUpdate ) );
	this->Connect( m_showLegend->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegend ) );
	this->Connect( m_showLegend->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
	m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
	m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
	m_signals->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
	m_signals->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
}
开发者ID:miloh,项目名称:kicad-source-mirror,代码行数:101,代码来源:sim_plot_frame_base.cpp

示例7: wxDialog


//.........这里部分代码省略.........
        bBitmapLoaded = true;
    }
    
    wxFlexGridSizer* flexGridSizer53 = new wxFlexGridSizer(0, 1, 0, 0);
    flexGridSizer53->SetFlexibleDirection( wxBOTH );
    flexGridSizer53->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer53->AddGrowableCol(0);
    flexGridSizer53->AddGrowableRow(5);
    this->SetSizer(flexGridSizer53);
    
    m_staticText55 = new wxStaticText(this, wxID_ANY, _("Exports the game to a native Android application. This will produce source files ready to be compiled for Android using the Android SDK and NDK."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_staticText55->Wrap(500);
    
    flexGridSizer53->Add(m_staticText55, 0, wxALL, 5);
    
    wxStaticBoxSizer* staticBoxSizer83 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Note")), wxVERTICAL);
    
    flexGridSizer53->Add(staticBoxSizer83, 1, wxALL|wxEXPAND, 5);
    
    m_staticText85 = new wxStaticText(this, wxID_ANY, _("This exporter is experimental and requires you to use advanced tools to compile the game for Android. Read this article for more information:"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_staticText85->Wrap(450);
    
    staticBoxSizer83->Add(m_staticText85, 0, wxALL, 5);
    
    m_hyperLink57 = new wxHyperlinkCtrl(this, wxID_ANY, _("How to compile your game exported files"), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE);
    m_hyperLink57->SetNormalColour(wxColour(wxT("#0000FF")));
    m_hyperLink57->SetHoverColour(wxColour(wxT("#0000FF")));
    m_hyperLink57->SetVisitedColour(wxColour(wxT("#FF0000")));
    
    staticBoxSizer83->Add(m_hyperLink57, 0, wxALL, 5);
    
    m_staticLine59 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL);
    
    flexGridSizer53->Add(m_staticLine59, 0, wxALL|wxEXPAND, 5);
    
    m_staticText61 = new wxStaticText(this, wxID_ANY, _("Export folder:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer53->Add(m_staticText61, 0, wxALL, 5);
    
    wxFlexGridSizer* flexGridSizer63 = new wxFlexGridSizer(1, 2, 0, 0);
    flexGridSizer63->SetFlexibleDirection( wxBOTH );
    flexGridSizer63->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer63->AddGrowableCol(0);
    flexGridSizer63->AddGrowableRow(0);
    
    flexGridSizer53->Add(flexGridSizer63, 1, wxALL|wxEXPAND, 0);
    
    m_exportFolderTextCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_exportFolderTextCtrl->SetHint(wxT(""));
    #endif
    m_exportFolderTextCtrl->AutoCompleteDirectories();
    
    flexGridSizer63->Add(m_exportFolderTextCtrl, 0, wxALL|wxEXPAND, 5);
    
    m_browserButton = new wxButton(this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer63->Add(m_browserButton, 0, wxALL, 5);
    
    wxFlexGridSizer* flexGridSizer79 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer79->SetFlexibleDirection( wxBOTH );
    flexGridSizer79->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    flexGridSizer53->Add(flexGridSizer79, 1, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer71 = new wxStdDialogButtonSizer();
    
    flexGridSizer53->Add(m_stdBtnSizer71, 0, wxALL|wxEXPAND, 5);
    
    m_okButton = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_okButton->SetDefault();
    m_stdBtnSizer71->AddButton(m_okButton);
    
    m_cancelButton = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer71->AddButton(m_cancelButton);
    m_stdBtnSizer71->Realize();
    
    SetName(wxT("AndroidExportDialogBase"));
    SetMinClientSize(wxSize(300,250));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_hyperLink57->Connect(wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler(AndroidExportDialogBase::OnHelpButtonClicked), NULL, this);
    m_browserButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AndroidExportDialogBase::OnBrowseButtonClicked), NULL, this);
    
}
开发者ID:HaoDrang,项目名称:GD,代码行数:101,代码来源:GDCppDialogs.cpp

示例8: DIALOG_SHIM

DIALOG_EXPORT_3DFILE_BASE::DIALOG_EXPORT_3DFILE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bUpperSizer;
	bUpperSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staticText1 = new wxStaticText( this, wxID_ANY, _("File Name:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	bUpperSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Save VRML Board File"), wxT("*.wrl"), wxDefaultPosition, wxDefaultSize, wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
	bUpperSizer->Add( m_filePicker, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
	
	m_staticText3 = new wxStaticText( this, wxID_ANY, _("Footprint 3D model path:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->Wrap( -1 );
	bUpperSizer->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	m_SubdirNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_SubdirNameCtrl->SetMaxLength( 0 ); 
	bUpperSizer->Add( m_SubdirNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	
	bSizer1->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bLowerSizer;
	bLowerSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	m_cbCopyFiles = new wxCheckBox( this, wxID_ANY, _("Copy 3D model files to 3D model path"), wxDefaultPosition, wxDefaultSize, 0 );
	m_cbCopyFiles->SetValue(true); 
	bSizer4->Add( m_cbCopyFiles, 0, wxALL, 5 );
	
	m_cbUseAbsolutePaths = new wxCheckBox( this, ID_USE_ABS_PATH, _("Use absolute paths to model files in board VRML file"), wxDefaultPosition, wxDefaultSize, 0 );
	m_cbUseAbsolutePaths->SetValue(true); 
	bSizer4->Add( m_cbUseAbsolutePaths, 0, wxALL, 5 );
	
	
	bLowerSizer->Add( bSizer4, 3, wxEXPAND, 5 );
	
	wxString m_rbSelectUnitsChoices[] = { _("Inch"), _("mm"), _("Meter") };
	int m_rbSelectUnitsNChoices = sizeof( m_rbSelectUnitsChoices ) / sizeof( wxString );
	m_rbSelectUnits = new wxRadioBox( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, m_rbSelectUnitsNChoices, m_rbSelectUnitsChoices, 1, wxRA_SPECIFY_COLS );
	m_rbSelectUnits->SetSelection( 0 );
	bLowerSizer->Add( m_rbSelectUnits, 1, wxALL|wxEXPAND, 5 );
	
	
	bSizer1->Add( bLowerSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer1->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1OK = new wxButton( this, wxID_OK );
	m_sdbSizer1->AddButton( m_sdbSizer1OK );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	
	bSizer1->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
	
	
	this->SetSizer( bSizer1 );
	this->Layout();
	bSizer1->Fit( this );
	
	// Connect Events
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_3DFILE_BASE::OnCancelClick ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_3DFILE_BASE::OnOkClick ), NULL, this );
}
开发者ID:constantin3000,项目名称:kicad-source-mirror,代码行数:75,代码来源:dialog_export_vrml_base.cpp

示例9: tb

clToolBar* CodeFormatter::CreateToolBar(wxWindow* parent)
{
    clToolBar* tb(NULL);
    if(m_mgr->AllowToolbar()) {
        // support both toolbars icon size
        int size = m_mgr->GetToolbarIconSize();

        tb = new clToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, clTB_DEFAULT_STYLE);
        tb->SetToolBitmapSize(wxSize(size, size));

        BitmapLoader* bmpLoader = m_mgr->GetStdIcons();
        if(size == 24) {
            tb->AddTool(XRCID("format_source"),
                        _("Format Source"),
                        bmpLoader->LoadBitmap(wxT("toolbars/24/codeformatter/code-format")),
                        _("Format Source Code"));
            tb->AddTool(XRCID("formatter_options"),
                        _("Format Options"),
                        bmpLoader->LoadBitmap(wxT("toolbars/24/codeformatter/code-format-options")),
                        _("Source Code Formatter Options..."));
        } else {
            // 16
            tb->AddTool(XRCID("format_source"),
                        _("Format Source"),
                        bmpLoader->LoadBitmap(wxT("toolbars/16/codeformatter/code-format")),
                        _("Format Source Code"));
            tb->AddTool(XRCID("formatter_options"),
                        _("Format Options"),
                        bmpLoader->LoadBitmap(wxT("toolbars/16/codeformatter/code-format-options")),
                        _("Source Code Formatter Options..."));
        }

#if defined(__WXMAC__)
        tb->AddSeparator();
#endif
        tb->Realize();
    }

    // Connect the events to us
    m_mgr->GetTheApp()->Connect(XRCID("format_source"),
                                wxEVT_COMMAND_MENU_SELECTED,
                                wxCommandEventHandler(CodeFormatter::OnFormat),
                                NULL,
                                (wxEvtHandler*)this);
    m_mgr->GetTheApp()->Connect(XRCID("formatter_options"),
                                wxEVT_COMMAND_MENU_SELECTED,
                                wxCommandEventHandler(CodeFormatter::OnFormatOptions),
                                NULL,
                                (wxEvtHandler*)this);
    m_mgr->GetTheApp()->Connect(XRCID("format_source"),
                                wxEVT_UPDATE_UI,
                                wxUpdateUIEventHandler(CodeFormatter::OnFormatUI),
                                NULL,
                                (wxEvtHandler*)this);
    m_mgr->GetTheApp()->Connect(XRCID("formatter_options"),
                                wxEVT_UPDATE_UI,
                                wxUpdateUIEventHandler(CodeFormatter::OnFormatOptionsUI),
                                NULL,
                                (wxEvtHandler*)this);
    return tb;
}
开发者ID:05storm26,项目名称:codelite,代码行数:61,代码来源:codeformatter.cpp

示例10: wxDialog

AjoutMatriceDialogueBase::AjoutMatriceDialogueBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 0, 1, 0, 0 );
	fgSizer4->AddGrowableCol( 0 );
	fgSizer4->AddGrowableRow( 1 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxFlexGridSizer* fgSizer5;
	fgSizer5 = new wxFlexGridSizer( 0, 5, 0, 0 );
	fgSizer5->AddGrowableCol( 4 );
	fgSizer5->AddGrowableRow( 0 );
	fgSizer5->SetFlexibleDirection( wxBOTH );
	fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Nom"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	fgSizer5->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString m_nomMatriceChoices[] = { wxT("A"), wxT("B"), wxT("C"), wxT("D"), wxT("E"), wxT("F"), wxT("G"), wxT("H"), wxT("I"), wxT("J"), wxT("K"), wxT("L"), wxT("M"), wxT("N"), wxT("O"), wxT("P"), wxT("Q"), wxT("R"), wxT("S"), wxT("T"), wxT("U"), wxT("V"), wxT("W"), wxT("X"), wxT("Y"), wxT("Z") };
	int m_nomMatriceNChoices = sizeof( m_nomMatriceChoices ) / sizeof( wxString );
	m_nomMatrice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_nomMatriceNChoices, m_nomMatriceChoices, 0 );
	m_nomMatrice->SetSelection( 26 );
	fgSizer5->Add( m_nomMatrice, 0, wxALL, 5 );
	
	m_lignesSpin = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10000000, 1 );
	fgSizer5->Add( m_lignesSpin, 0, wxALL, 5 );
	
	m_colonnesSpin = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10000000, 1 );
	fgSizer5->Add( m_colonnesSpin, 0, wxALL, 5 );
	
	BoutonValider = new wxButton( this, VALIDER_TAILLE_MATRICE_ID, wxT("Changer la taille"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer5->Add( BoutonValider, 0, wxALL|wxEXPAND, 5 );
	
	
	fgSizer4->Add( fgSizer5, 1, wxEXPAND, 5 );
	
	m_tableauMatrice = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	
	// Grid
	m_tableauMatrice->CreateGrid( 0, 0 );
	m_tableauMatrice->EnableEditing( true );
	m_tableauMatrice->EnableGridLines( true );
	m_tableauMatrice->EnableDragGridSize( false );
	m_tableauMatrice->SetMargins( 0, 0 );
	
	// Columns
	m_tableauMatrice->EnableDragColMove( false );
	m_tableauMatrice->EnableDragColSize( true );
	m_tableauMatrice->SetColLabelSize( 30 );
	m_tableauMatrice->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
	
	// Rows
	m_tableauMatrice->EnableDragRowSize( true );
	m_tableauMatrice->SetRowLabelSize( 80 );
	m_tableauMatrice->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
	
	// Label Appearance
	
	// Cell Defaults
	m_tableauMatrice->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
	fgSizer4->Add( m_tableauMatrice, 0, wxALL|wxEXPAND, 5 );
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1Save = new wxButton( this, wxID_SAVE );
	m_sdbSizer1->AddButton( m_sdbSizer1Save );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	
	fgSizer4->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
	
	
	this->SetSizer( fgSizer4 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	BoutonValider->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AjoutMatriceDialogueBase::SurClicValiderTailleMatrice ), NULL, this );
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AjoutMatriceDialogueBase::SurClicAnnuler ), NULL, this );
	m_sdbSizer1Save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AjoutMatriceDialogueBase::SurClicSauver ), NULL, this );
}
开发者ID:zer0tonin,项目名称:NF05lab,代码行数:86,代码来源:Dialogs.cpp

示例11: wxCHECK_VERSION


//.........这里部分代码省略.........
  /* Add private jsMath fonts, if they exist */ 
#if wxCHECK_VERSION(3, 1, 1)
  if (wxFileExists(fontPrefix + wxT(CMEX10) + wxT(".ttf"))) wxFont::AddPrivateFont(fontPrefix + wxT(CMEX10) + wxT(".ttf"));
  if (wxFileExists(fontPrefix + wxT(CMSY10) + wxT(".ttf"))) wxFont::AddPrivateFont(fontPrefix + wxT(CMSY10) + wxT(".ttf"));
  if (wxFileExists(fontPrefix + wxT(CMR10) + wxT(".ttf")))  wxFont::AddPrivateFont(fontPrefix + wxT(CMR10) + wxT(".ttf"));
  if (wxFileExists(fontPrefix + wxT(CMMI10) + wxT(".ttf"))) wxFont::AddPrivateFont(fontPrefix + wxT(CMMI10) + wxT(".ttf"));
  if (wxFileExists(fontPrefix + wxT(CMTI10) + wxT(".ttf"))) wxFont::AddPrivateFont(fontPrefix + wxT(CMTI10) + wxT(".ttf"));

  /* Add private Libertine fonts, if they exist */
  if (wxFileExists(fontPrefix + wxT(LIBERTINE1))) 
	  wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE1));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE2))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE2));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE3))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE3));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE4))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE4));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE5))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE5));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE6))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE6));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE7))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE7));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE8))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE8));
  if (wxFileExists(fontPrefix + wxT(LIBERTINE9))) wxFont::AddPrivateFont(fontPrefix + wxT(LIBERTINE9));
#endif
  wxSetWorkingDirectory(oldWorkingDir);

#endif

  m_locale.AddCatalogLookupPathPrefix(m_dirstruct->LocaleDir());
  m_locale.AddCatalogLookupPathPrefix(m_dirstruct->LocaleDir()+wxT("/wxwin"));
  m_locale.AddCatalogLookupPathPrefix(wxT("/usr/share/locale"));
  m_locale.AddCatalogLookupPathPrefix(wxT("/usr/local/share/locale"));
  m_locale.AddCatalog(wxT("wxMaxima"));
  m_locale.AddCatalog(wxT("wxMaxima-wxstd"));

#if defined __WXMAC__
  wxString path;
  wxGetEnv(wxT("PATH"), &path);
  wxSetEnv(wxT("PATH"), path << wxT(":/usr/local/bin"));

  wxApp::SetExitOnFrameDelete(false);
  wxMenuBar *menuBar = new wxMenuBar;
  wxMenu *fileMenu = new wxMenu;
  fileMenu->Append(wxMaxima::mac_newId, _("&New\tCtrl+N"));
  fileMenu->Append(wxMaxima::mac_openId, _("&Open\tCtrl+O"));
  menuBar->Append(fileMenu, _("File"));
  wxMenuBar::MacSetCommonMenuBar(menuBar);

  Connect(wxMaxima::mac_newId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyApp::OnFileMenu));
  Connect(wxMaxima::mac_openId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyApp::OnFileMenu));
  Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyApp::OnFileMenu));
#endif

  if (cmdLineParser.Found(wxT("v")))
  {
    std::cout << "wxMaxima ";
    std::cout << GITVERSION;
#if defined(WXMAXIMA_GIT_VERSION)
    std::cout << " (Git version: " << WXMAXIMA_GIT_VERSION << ")";
#endif
    std::cout << "\n";
    wxExit();
  }
  if (cmdLineParser.Found(wxT("h")))
  {
    std::cout << "A feature-rich graphical user interface for the computer algebra system maxima\n";
    std::cout << cmdLineParser.GetUsageString();
    wxExit();
  }

  if (cmdLineParser.Found(wxT("b")))
  {
    evalOnStartup = true;
    exitAfterEval = true;
  }
  
  if (cmdLineParser.Found(wxT("e")))
    evalOnStartup = true;

  if (cmdLineParser.Found(wxT("o"), &file))
  {
    wxFileName FileName = file;
    FileName.MakeAbsolute();
    wxString CanonicalFilename = FileName.GetFullPath();
    NewWindow(wxString(CanonicalFilename), evalOnStartup, exitAfterEval);
    return true;
  }

  if(cmdLineParser.GetParamCount() > 0)
  {
    for (unsigned int i=0; i < cmdLineParser.GetParamCount(); i++)
    {
      wxFileName FileName = cmdLineParser.GetParam(i);
      FileName.MakeAbsolute();
      
      wxString CanonicalFilename = FileName.GetFullPath();
      NewWindow(CanonicalFilename, evalOnStartup, exitAfterEval);
    }
  }
  else
    NewWindow();

  return true;
}
开发者ID:yurchor,项目名称:wxmaxima,代码行数:101,代码来源:main.cpp

示例12: wxFrame

RibbonFrameBase::RibbonFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	m_mgr.SetManagedWindow(this);
	m_mgr.SetFlags(wxAUI_MGR_DEFAULT);
	
	m_ribbonBar1 = new wxRibbonBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRIBBON_BAR_DEFAULT_STYLE );
	m_ribbonBar1->SetArtProvider(new wxRibbonDefaultArtProvider); 
	m_mgr.AddPane( m_ribbonBar1, wxAuiPaneInfo() .Top() .CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Movable( false ).Dock().Fixed().DockFixed( false ).BottomDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ).BestSize( wxSize( -1,130 ) ).MinSize( wxSize( -1,130 ) ).Layer( 1000 ) );
	
	m_ribbonPage3 = new wxRibbonPage( m_ribbonBar1, wxID_ANY, wxT("NF05Lab") , wxNullBitmap , 0 );
	m_ribbonBar1->SetActivePage( m_ribbonPage3 ); 
	m_ribbonPanel7 = new wxRibbonPanel( m_ribbonPage3, wxID_ANY, wxT("Fichier") , wxNullBitmap , wxDefaultPosition, wxDefaultSize, wxRIBBON_PANEL_DEFAULT_STYLE );
	m_ribbonButtonBar6 = new wxRibbonButtonBar( m_ribbonPanel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_ribbonButtonBar6->AddButton( OUVRIR_BOUTTON, wxT("Ouvrir"), open127_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonButtonBar6->AddButton( ENREGISTRER_BOUTTON, wxT("Enregistrer"), save15_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonPanel3 = new wxRibbonPanel( m_ribbonPage3, wxID_ANY, wxT("Exécution") , wxNullBitmap , wxDefaultPosition, wxDefaultSize, wxRIBBON_PANEL_DEFAULT_STYLE );
	m_ribbonButtonBar3 = new wxRibbonButtonBar( m_ribbonPanel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_ribbonButtonBar3->AddButton( EXECUTER_COMMANDE_BOUTON_ID, wxT("Exécuter la commande"), right133_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonButtonBar3->AddButton( EFFACER_RESULTAT_BOUTON_ID, wxT("Effacer les résultats"), left37_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonPanel2 = new wxRibbonPanel( m_ribbonPage3, wxID_ANY, wxT("Gestion des variables") , wxNullBitmap , wxDefaultPosition, wxDefaultSize, wxRIBBON_PANEL_DEFAULT_STYLE );
	m_ribbonButtonBar2 = new wxRibbonButtonBar( m_ribbonPanel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_ribbonButtonBar2->AddButton( AJOUTER_VARIABLE_BOUTON_ID, wxT("Ajouter..."), add196_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonButtonBar2->AddButton( EDITER_VARIABLE_BOUTON_ID, wxT("Editer..."), edit45_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonButtonBar2->AddButton( SUPPRIMER_VARIABLE_BOUTON_ID, wxT("Supprimer"), delete99_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonButtonBar2->AddButton( BOUTTON_VIDER_VARIABLES, wxT("Supprimer toutes les variables"), trash30_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonPanel6 = new wxRibbonPanel( m_ribbonPage3, wxID_ANY, wxT("Fenêtres") , wxNullBitmap , wxDefaultPosition, wxDefaultSize, wxRIBBON_PANEL_DEFAULT_STYLE );
	m_barreBoutonsAffichage = new wxRibbonButtonBar( m_ribbonPanel6, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_barreBoutonsAffichage->AddToggleButton( BOUTON_AFFICHAGE_VARIABLES, wxT("Afficher la liste des variables"), list1_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonPanel5 = new wxRibbonPanel( m_ribbonPage3, wxID_ANY, wxT("Systèmes") , wxNullBitmap , wxDefaultPosition, wxDefaultSize, wxRIBBON_PANEL_DEFAULT_STYLE );
	m_ribbonButtonBar5 = new wxRibbonButtonBar( m_ribbonPanel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_ribbonButtonBar5->AddButton( RESOUDRE_SYTEME, wxT("Résoudre système"), settings48_png_to_wx_bitmap(), wxEmptyString);
	m_ribbonPage5 = new wxRibbonPage( m_ribbonBar1, wxID_ANY, wxT("?") , wxNullBitmap , 0 );
	m_ribbonPage5->Hide();
	
	m_ribbonBar1->Realize();
	
	m_panneauPrincipal = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_mgr.AddPane( m_panneauPrincipal, wxAuiPaneInfo() .Center() .CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Movable( false ).Dock().Resizable().FloatingSize( wxDefaultSize ).DockFixed( false ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ) );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 0, 1, 0, 0 );
	fgSizer3->AddGrowableCol( 0 );
	fgSizer3->AddGrowableRow( 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_zoneResultats = new wxTextCtrl( m_panneauPrincipal, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
	m_zoneResultats->SetFont( wxFont( 12, 75, 90, 90, false, wxT("Consolas") ) );
	
	fgSizer3->Add( m_zoneResultats, 0, wxALL|wxEXPAND, 5 );
	
	m_zoneCommande = new wxTextCtrl( m_panneauPrincipal, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
	m_zoneCommande->SetFont( wxFont( 12, 75, 90, 90, false, wxT("Consolas") ) );
	
	fgSizer3->Add( m_zoneCommande, 0, wxALL|wxEXPAND, 5 );
	
	
	m_panneauPrincipal->SetSizer( fgSizer3 );
	m_panneauPrincipal->Layout();
	fgSizer3->Fit( m_panneauPrincipal );
	m_panneauVariables = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_mgr.AddPane( m_panneauVariables, wxAuiPaneInfo() .Name( wxT("panneauVariables") ).Left() .Caption( wxT("Variables") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( 400,250 ) ).DockFixed( false ).BestSize( wxSize( 200,100 ) ).MinSize( wxSize( 200,100 ) ) );
	
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 0, 1, 0, 0 );
	fgSizer1->AddGrowableCol( 0 );
	fgSizer1->AddGrowableRow( 0 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_arbreVariables = new wxTreeCtrl( m_panneauVariables, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE );
	fgSizer1->Add( m_arbreVariables, 0, wxALL|wxEXPAND, 0 );
	
	
	m_panneauVariables->SetSizer( fgSizer1 );
	m_panneauVariables->Layout();
	fgSizer1->Fit( m_panneauVariables );
	m_arbreSyntaxe = new wxTreeCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE );
	m_mgr.AddPane( m_arbreSyntaxe, wxAuiPaneInfo() .Right() .Caption( wxT("Arbre syntaxique") ).PinButton( true ).Dock().Resizable().FloatingSize( wxDefaultSize ).DockFixed( false ).BestSize( wxSize( 200,-1 ) ).MinSize( wxSize( 200,-1 ) ) );
	
	
	m_mgr.Update();
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( RibbonFrameBase::OnExit ) );
	this->Connect( wxID_ANY, wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEventHandler( RibbonFrameBase::SurChangementOngletRuban ) );
	this->Connect( OUVRIR_BOUTTON, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicOuvrir ) );
	this->Connect( ENREGISTRER_BOUTTON, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicEnregistrer ) );
	this->Connect( EXECUTER_COMMANDE_BOUTON_ID, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicExecuterCommande ) );
	this->Connect( EFFACER_RESULTAT_BOUTON_ID, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicEffacerResultats ) );
	this->Connect( AJOUTER_VARIABLE_BOUTON_ID, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicAjouterVariable ) );
	this->Connect( EDITER_VARIABLE_BOUTON_ID, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicEditerVariable ) );
	this->Connect( SUPPRIMER_VARIABLE_BOUTON_ID, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicSupprimerVariable ) );
	this->Connect( BOUTTON_VIDER_VARIABLES, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicViderVariables ) );
	this->Connect( BOUTON_AFFICHAGE_VARIABLES, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxCommandEventHandler( RibbonFrameBase::SurClicAffichageVariables ) );
	this->Connect( RESOUDRE_SYTEME, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler( RibbonFrameBase::SurClicBouttonResoudreSysteme ) );
	m_zoneCommande->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( RibbonFrameBase::SurValidationCommande ), NULL, this );
}
开发者ID:zer0tonin,项目名称:NF05lab,代码行数:100,代码来源:Dialogs.cpp

示例13: SetMinSize

bool wxPickerBase::CreateBase(wxWindow *parent,
                         wxWindowID id,
                         const wxString &text,
                         const wxPoint& pos,
                         const wxSize& size,
                         long style,
                         const wxValidator& validator,
                         const wxString& name)
{
    // remove any border style from our style as wxPickerBase's window must be
    // invisible (user styles must be set on the textctrl or the platform-dependent picker)
    style &= ~wxBORDER_MASK;

    if (!wxControl::Create(parent, id, pos, size, style | wxNO_BORDER | wxTAB_TRAVERSAL,
                           validator, name))
        return false;

    SetMinSize( size );

    m_sizer = new wxBoxSizer(wxHORIZONTAL);

    if (HasFlag(wxPB_USE_TEXTCTRL))
    {
        // NOTE: the style of this class (wxPickerBase) and the style of the
        //       attached text control are different: GetTextCtrlStyle() extracts
        //       the styles related to the textctrl from the styles passed here
        m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
                                wxDefaultPosition, wxDefaultSize,
                                GetTextCtrlStyle(style));
        if (!m_text)
        {
            wxFAIL_MSG( wxT("wxPickerBase's textctrl creation failed") );
            return false;
        }

        // set the maximum lenght allowed for this textctrl.
        // This is very important since any change to it will trigger an update in
        // the m_picker; for very long strings, this real-time synchronization could
        // become a CPU-blocker and thus should be avoided.
        // 32 characters will be more than enough for all common uses.
        m_text->SetMaxLength(32);

        // set the initial contents of the textctrl
        m_text->SetValue(text);

        m_text->Connect(m_text->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
                wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate),
                NULL, this);
        m_text->Connect(m_text->GetId(), wxEVT_KILL_FOCUS,
                wxFocusEventHandler(wxPickerBase::OnTextCtrlKillFocus),
                NULL, this);

        m_text->Connect(m_text->GetId(), wxEVT_DESTROY,
                wxWindowDestroyEventHandler(wxPickerBase::OnTextCtrlDelete),
                NULL, this);

        // the text control's proportion values defaults to 2
        m_sizer->Add(m_text, 2, GetDefaultTextCtrlFlag(), 5);
    }

    return true;
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:62,代码来源:pickerbase.cpp

示例14: wxDialog


//.........这里部分代码省略.........
	buttonYM = new wxButton( m_panel2, wxID_ANY, wxT("Y-"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer2->Add( buttonYM, 0, wxALL|wxEXPAND, 5 );
	
	
	gSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer5->Add( gSizer2, 1, wxEXPAND, 5 );
	
	m_staticline1 = new wxStaticLine( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer5->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	button_null_set = new wxButton( m_panel2, wxID_ANY, wxT("Nullpunkt setzen"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( button_null_set, 0, wxALL, 5 );
	
	
	bSizer10->Add( 30, 0, 1, wxEXPAND, 5 );
	
	button_null_fahrt = new wxButton( m_panel2, wxID_ANY, wxT("Zu Null fahren"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( button_null_fahrt, 0, wxALL, 5 );
	
	
	bSizer10->Add( 30, 0, 1, wxEXPAND, 20 );
	
	button_reset = new wxButton( m_panel2, wxID_ANY, wxT("Zuruecksetzen"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( button_reset, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
	
	bSizer5->Add( bSizer10, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_panel2->SetSizer( bSizer5 );
	m_panel2->Layout();
	bSizer5->Fit( m_panel2 );
	m_notebook1->AddPage( m_panel2, wxT("Steuerung"), true );
	m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer( wxVERTICAL );
	
	merkpunkteListe = new wxListCtrl( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL );
	bSizer12->Add( merkpunkteListe, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer13;
	bSizer13 = new wxBoxSizer( wxHORIZONTAL );
	
	button_pos_save = new wxButton( m_panel3, wxID_ANY, wxT("Position speichern"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer13->Add( button_pos_save, 0, wxALL, 5 );
	
	button_pos_del = new wxButton( m_panel3, wxID_ANY, wxT("Position loeschen"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer13->Add( button_pos_del, 0, wxALL, 5 );
	
	button_pos_call = new wxButton( m_panel3, wxID_ANY, wxT("Position abrufen"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer13->Add( button_pos_call, 0, wxALL, 5 );
	
	bSizer14->Add( bSizer13, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	bSizer12->Add( bSizer14, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_staticline2 = new wxStaticLine( m_panel3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer12->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxVERTICAL );
	
	button_Stop1 = new wxButton( m_panel3, wxID_ANY, wxT("Stop"), wxDefaultPosition, wxSize( -1,60 ), 0 );
	bSizer15->Add( button_Stop1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	bSizer12->Add( bSizer15, 0, wxEXPAND, 5 );
	
	m_panel3->SetSizer( bSizer12 );
	m_panel3->Layout();
	bSizer12->Fit( m_panel3 );
	m_notebook1->AddPage( m_panel3, wxT("Merkpunkte"), false );
	
	bSizer7->Add( m_notebook1, 1, wxEXPAND | wxALL, 5 );
	
	this->SetSizer( bSizer7 );
	this->Layout();
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( dialogSteuerung_tmp::onClose ) );
	buttonGeschwBest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onGeschwBest ), NULL, this );
	buttonYP->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onYPClick ), NULL, this );
	buttonXM->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onXMClick ), NULL, this );
	button_Stop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onStClick ), NULL, this );
	buttonXP->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onXPClick ), NULL, this );
	buttonYM->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onYMClick ), NULL, this );
	button_null_set->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onNullClick ), NULL, this );
	button_null_fahrt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onNullCall ), NULL, this );
	button_reset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onZuClick ), NULL, this );
	button_pos_save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onPosSpeich ), NULL, this );
	button_pos_del->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onPosDel ), NULL, this );
	button_pos_call->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onPosCall ), NULL, this );
	button_Stop1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialogSteuerung_tmp::onStClick ), NULL, this );
}
开发者ID:CodeOnSunday,项目名称:CNCFraese,代码行数:101,代码来源:CNCMainFrame.cpp

示例15: wxCommandEventHandler

void FindReplaceDialog::ConnectEvents()
{
	// Connect buttons
	m_find->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_replace->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_replaceAll->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_markAll->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_cancel->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_clearBookmarks->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);

	// connect options
	m_matchCase->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_matchWholeWord->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_regualrExpression->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_searchUp->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
	m_selectionOnly->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this);
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:17,代码来源:findreplacedlg.cpp


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