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


C++ SetSizer函数代码示例

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


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

示例1: Create

Configuration::Configuration(wxWindow* parent,wxWindowID id)
{
  //(*Initialize(Configuration)
  wxBoxSizer* sizDefaults;

  Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));
  sizMain = new wxBoxSizer(wxHORIZONTAL);
  sizGroups = new wxStaticBoxSizer(wxVERTICAL, this, _("Groups"));
  m_Groups = new wxListBox(this, ID_LST_GROUPS, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_LST_GROUPS"));
  m_Groups->SetToolTip(_("This is a list of all groups of bindings available to the plugin."));
  sizGroups->Add(m_Groups, 1, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizAddDeleteRename = new wxBoxSizer(wxHORIZONTAL);
  m_AddGroup = new wxButton(this, ID_BTN_ADD_GROUP, _("Add"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator, _T("ID_BTN_ADD_GROUP"));
  m_AddGroup->SetToolTip(_("Add a new group..."));
  sizAddDeleteRename->Add(m_AddGroup, 1, wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
  m_DeleteGroup = new wxButton(this, ID_BTN_DELETE_GROUP, _("Delete"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator, _T("ID_BTN_DELETE_GROUP"));
  m_DeleteGroup->SetToolTip(_("Delete the selected group..."));
  sizAddDeleteRename->Add(m_DeleteGroup, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
  m_RenameGroup = new wxButton(this, ID_BTN_RENAME_GROUP, _("Rename"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator, _T("ID_BTN_RENAME_GROUP"));
  m_RenameGroup->SetToolTip(_("Rename the selected group..."));
  sizAddDeleteRename->Add(m_RenameGroup, 1, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
  sizGroups->Add(sizAddDeleteRename, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizDefaults = new wxBoxSizer(wxHORIZONTAL);
  m_Defaults = new wxButton(this, ID_BTN_DEFAULTS, _("Defaults"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BTN_DEFAULTS"));
  sizDefaults->Add(m_Defaults, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizGroups->Add(sizDefaults, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizMain->Add(sizGroups, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizBindings = new wxStaticBoxSizer(wxVERTICAL, this, _("Bindings"));
  sizIdentifiersHor = new wxBoxSizer(wxHORIZONTAL);
  sizIdentifiersVert = new wxBoxSizer(wxVERTICAL);
  lblIdentifiers = new wxStaticText(this, ID_LBL_IDENTIFIERS, _("Identifiers:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_LBL_IDENTIFIERS"));
  sizIdentifiersVert->Add(lblIdentifiers, 0, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizIdentifiers = new wxBoxSizer(wxHORIZONTAL);
  m_Identifiers = new wxListBox(this, ID_LST_IDENTIFIERS, wxDefaultPosition, wxSize(188,115), 0, 0, 0, wxDefaultValidator, _T("ID_LST_IDENTIFIERS"));
  m_Identifiers->SetToolTip(_("This is a list of all identifiers (tokens) available within the selected group."));
  sizIdentifiers->Add(m_Identifiers, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizAddDeleteChange = new wxBoxSizer(wxVERTICAL);
  m_AddIdentifier = new wxButton(this, ID_BTN_ADD_IDENTIFIER, _("Add"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator, _T("ID_BTN_ADD_IDENTIFIER"));
  m_AddIdentifier->SetToolTip(_("Add a new identifier..."));
  sizAddDeleteChange->Add(m_AddIdentifier, 0, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  m_DeleteIdentifier = new wxButton(this, ID_BTN_DELETE_IDENTIFIERS, _("Delete"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator, _T("ID_BTN_DELETE_IDENTIFIERS"));
  m_DeleteIdentifier->SetToolTip(_("Delete the selected identifier..."));
  sizAddDeleteChange->Add(m_DeleteIdentifier, 0, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  m_ChangeIdentifier = new wxButton(this, ID_BTN_CHANGE_IDENTIFIER, _("Change"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator, _T("ID_BTN_CHANGE_IDENTIFIER"));
  m_ChangeIdentifier->SetToolTip(_("Change (rename) the selected identifier..."));
  sizAddDeleteChange->Add(m_ChangeIdentifier, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizIdentifiers->Add(sizAddDeleteChange, 0, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizIdentifiersVert->Add(sizIdentifiers, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizIdentifiersHor->Add(sizIdentifiersVert, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizBindings->Add(sizIdentifiersHor, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizHeaders = new wxBoxSizer(wxVERTICAL);
  lblHeaders = new wxStaticText(this, ID_LBL_HEADERS, _("Headers:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_LBL_HEADERS"));
  sizHeaders->Add(lblHeaders, 0, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  m_Headers = new wxTextCtrl(this, ID_TXT_HEADERS, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_MULTILINE, wxDefaultValidator, _T("ID_TXT_HEADERS"));
  m_Headers->SetToolTip(_("This is a list of all header files required for the selected identifier (token) within the selected group."));
  sizHeaders->Add(m_Headers, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizBindings->Add(sizHeaders, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  sizMain->Add(sizBindings, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
  SetSizer(sizMain);
  sizMain->Fit(this);
  sizMain->SetSizeHints(this);

  Connect(ID_LST_GROUPS,wxEVT_COMMAND_LISTBOX_SELECTED,(wxObjectEventFunction)&Configuration::OnGroupsSelect);
  Connect(ID_LST_GROUPS,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&Configuration::OnRenameGroup);
  Connect(ID_BTN_ADD_GROUP,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnBtnAddGroupClick);
  Connect(ID_BTN_DELETE_GROUP,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnBtnDeleteGroupClick);
  Connect(ID_BTN_RENAME_GROUP,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnRenameGroup);
  Connect(ID_BTN_DEFAULTS,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnBtnDefaultsClick);
  Connect(ID_LST_IDENTIFIERS,wxEVT_COMMAND_LISTBOX_SELECTED,(wxObjectEventFunction)&Configuration::OnIdentifiersSelect);
  Connect(ID_LST_IDENTIFIERS,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&Configuration::OnChangeIdentifier);
  Connect(ID_BTN_ADD_IDENTIFIER,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnBtnAddIdentifierClick);
  Connect(ID_BTN_DELETE_IDENTIFIERS,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnBtnDeleteIdentifierClick);
  Connect(ID_BTN_CHANGE_IDENTIFIER,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Configuration::OnChangeIdentifier);
  Connect(ID_TXT_HEADERS,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&Configuration::OnHeadersText);
  //*)

  m_BlockHeadersText = false;
  m_Dirty            = false;

  ShowGroups();
}// Configuration
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:81,代码来源:configuration.cpp

示例2: layer_settings_control


//.........这里部分代码省略.........
    ////////////////////////
    ///
    ///  Polygons settings
    ///
    ////////////////////////
    {
        wxStaticBoxSizer *boxSizerPolygons = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Polygons settings"));
        wxBoxSizer *boxColorPickersPolygons = new wxBoxSizer(wxVERTICAL);
        wxStaticBoxSizer *boxSizerRingsColour = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Rings colour"));
        wxStaticBoxSizer *boxSizerInsideColour = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Inside colour"));
        m_colourPickerRingsPolygons = new wxColourPickerCtrl(this, wxID_ANY, *wxRED, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE);
        m_colourPickerInsidePolygons = new wxColourPickerCtrl(this, wxID_ANY, *wxBLUE, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE);
        boxSizerRingsColour->Add(m_colourPickerRingsPolygons, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        boxSizerInsideColour->Add(m_colourPickerInsidePolygons, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        boxColorPickersPolygons->Add(boxSizerRingsColour, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        boxColorPickersPolygons->Add(boxSizerInsideColour, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        wxBoxSizer *boxSlidersPolygons = new wxBoxSizer(wxVERTICAL);
        wxStaticBoxSizer *boxSizerRingsWidth = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Rings width"));
        // Ring width
        m_sliderWidthRings = new wxSlider(this, wxID_ANY, 1, 1, 10, wxDefaultPosition, wxSize(100, 40));
        boxSizerRingsWidth->Add(m_sliderWidthRings, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        boxSlidersPolygons->Add(boxSizerRingsWidth, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

        boxSizerPolygons->Add(boxColorPickersPolygons, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        boxSizerPolygons->Add(boxSlidersPolygons, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

        m_choicePolygons = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, WXSIZEOF(vector_layer_settings_control::choices_inside_polygons), vector_layer_settings_control::choices_inside_polygons);
        m_choicePolygons->SetSelection(0);
        boxSizerPolygons->Add(m_choicePolygons, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        m_main_sizer->Add(boxSizerPolygons, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
    }

    ////////////////////////
    ///
    ///  DBF : etiquettes
    ///
    ////////////////////////
    /*
    if (ogr_vectorLayer || (vectorLayer && (vectorLayer->LayerContent()->FlagDBF())))
    {
        wxStaticBoxSizer *boxSizerLabels = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Labels"));

        wxArrayString attributesNames;
        // On parcourt le vecteur et on recupere les valeurs (on met une chaine vide en premier --> permet de ne rien afficher)
        attributesNames.Add(wxT(""));
        for (unsigned int i = 0; i < vectorLayer->LayerContent()->m_dbfAttributesNames.size(); ++i)
            attributesNames.Add(vectorLayer->LayerContent()->m_dbfAttributesNames[i]);
        // Pffffffffffffffff
        wxCArrayString temp(attributesNames);
        m_choiceLabels = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, attributesNames.GetCount(), temp.GetStrings());
        boxSizerLabels->Add(m_choiceLabels, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        m_main_sizer->Add(boxSizerLabels, 1, wxEXPAND | wxALL, 5);
    }
    */

    ////////////////////////
    ///
    ///  Texts
    ///
    ////////////////////////

    wxStaticBoxSizer *boxSizerTexts = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Texts settings"));
    // texts color
    wxStaticBoxSizer *boxSizerTextsColor = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Texts color"));
    boxSizerTexts->Add(boxSizerTextsColor, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
    m_colourPickerTexts = new wxColourPickerCtrl(this, wxID_ANY, *wxRED, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE);
    boxSizerTextsColor->Add(m_colourPickerTexts, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
    /*
	// texts font
	wxStaticBoxSizer *boxSizerTextsFont = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Texts font"));
	boxSizerTexts->Add(boxSizerTextsFont, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
	m_fontPickerTexts = new wxFontPickerCtrl(this, wxID_ANY, wxNullFont, wxDefaultPosition, wxDefaultSize, wxFNTP_USE_TEXTCTRL);
	boxSizerTextsFont->Add(m_fontPickerTexts, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
        */
    // texts visibility
    wxStaticBoxSizer *boxSizerTextsVisibility = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Texts visibility"));
    boxSizerTexts->Add(boxSizerTextsVisibility, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
    m_checkShowTexts = new wxCheckBox(this, wxID_ANY, _("Show texts"));
    m_checkShowTexts->SetValue(true);
    boxSizerTextsVisibility->Add(m_checkShowTexts, 1, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

    m_main_sizer->Add(boxSizerTexts, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL | wxALL, 5);

    ////////////////////////
    ///
    ///  Buttons
    ///
    ////////////////////////
    wxStdDialogButtonSizer *buttons_sizer = new wxStdDialogButtonSizer();
    buttons_sizer->AddButton(new wxButton(this, wxID_OK, wxT("OK")));
    buttons_sizer->AddButton(new wxButton(this, wxID_APPLY, wxT("Apply")));
    buttons_sizer->AddButton(new wxButton(this, wxID_CANCEL, wxT("Cancel")));
    buttons_sizer->Realize();
    m_main_sizer->Add(buttons_sizer, 0, wxALIGN_RIGHT | wxALL, 5);

    m_main_sizer->SetSizeHints(this);
    SetSizer(m_main_sizer);
    Layout();
    Centre();
}
开发者ID:myirci,项目名称:gilviewer,代码行数:101,代码来源:vector_layer_settings_control.cpp

示例3: m_battle

SingleOptionDialog::SingleOptionDialog( IBattle& battle, const wxString& optiontag )
    : m_battle( battle ),
    m_tag( optiontag ),
    m_checkbox( 0 ),
    m_combobox( 0 ),
    m_spinctrl( 0 ),
    m_textctrl( 0 )
{
	OptionsWrapper& optWrap = m_battle.CustomBattleOptions();
	OptionsWrapper::GameOption optFlag = ( OptionsWrapper::GameOption )s2l( optiontag.BeforeFirst( '_' ) );
	wxString key = optiontag.AfterFirst( '_' );
	OptionType type = optWrap.GetSingleOptionType( key );
	Create( (wxWindow*)&ui().mw(), wxID_ANY, _( "Change option" ), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T( "OptionDialog" ) );
	if ( !optWrap.keyExists( key, optFlag, false, type ) )
	{
		EndModal( wxID_CANCEL );
		return;
	}

	wxBoxSizer* m_main_sizer = new wxBoxSizer( wxVERTICAL );

	// wxStaticText* m_labelctrl = wxStaticText();

	switch ( type )
	{
		case opt_bool:
			{
				mmOptionBool opt = optWrap.m_opts[optFlag].bool_map[key];
				m_checkbox = new wxCheckBox( this, wxID_ANY, opt.name );
				m_checkbox->SetToolTip( TE( opt.description ) );
				m_checkbox->SetValue( opt.value );
				m_main_sizer->Add( m_checkbox, 0, wxEXPAND );
				break;
			}
		case opt_float:
			{
				mmOptionFloat opt = optWrap.m_opts[optFlag].float_map[key];
				m_spinctrl = new SlSpinCtrlDouble<SingleOptionDialog>();
				m_spinctrl->Create( this, wxID_ANY, _T( "" ), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, double( opt.min ), double( opt.max ), double( opt.value ), double( opt.stepping ), opt.key );
				m_spinctrl->SetToolTip( TE( opt.description ) );
				m_main_sizer->Add( m_spinctrl, 0, wxEXPAND );
				break;
			}
		case opt_string:
			{
				mmOptionString opt = optWrap.m_opts[optFlag].string_map[key];
				m_textctrl = new wxTextCtrl( this, wxID_ANY, opt.value, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, opt.key );
				m_textctrl->SetToolTip( TE( opt.description ) );
				m_main_sizer->Add( m_textctrl, 0, wxEXPAND );
				break;
			}
		case opt_list:
			{
				mmOptionList opt = optWrap.m_opts[optFlag].list_map[key];
				int temp = int( opt.cbx_choices.GetCount() - 1 );
				int index = clamp( opt.cur_choice_index, 0, temp );
				m_combobox = new wxComboBox( this, wxID_ANY, opt.cbx_choices[index], wxDefaultPosition, wxDefaultSize, opt.cbx_choices, wxCB_READONLY, wxDefaultValidator );
				wxString tooltip = opt.description + _T( "\n" );
				for ( ListItemVec::iterator itor = opt.listitems.begin(); itor != opt.listitems.end(); itor++ )
				{
					tooltip += _T( "\n" ) + itor->name + _T( ": " ) + itor->desc;
				}
				m_combobox->SetToolTip( TE( tooltip ) );
				m_main_sizer->Add( m_combobox, 0, wxEXPAND );
				break;
			}
		default:
			{
				EndModal( wxID_CANCEL );
				return;
				break;
			}
	}

	wxSize __SpacerSize_1 = wxDLG_UNIT( this, wxSize( 0, 0 ) );
	m_main_sizer->Add( __SpacerSize_1.GetWidth(), __SpacerSize_1.GetHeight(), 0, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5 );
	wxStaticLine* m_separator1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( 10, -1 ), wxLI_HORIZONTAL, _T( "ID_STATICLINE1" ) );
	m_main_sizer->Add( m_separator1, 0, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5 );
	wxBoxSizer* m_buttons_sizer = new wxBoxSizer( wxHORIZONTAL );
	m_cancel_button = new wxButton( this, ID_CANCEL, _( "Cancel" ), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T( "ID_CANCEL" ) );
	m_buttons_sizer->Add( m_cancel_button, 0, wxALL | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 5 );
	m_buttons_sizer->Add( 0, 0, 1, wxALL | wxEXPAND | wxSHAPED | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 0 );
	m_ok_button = new wxButton( this, ID_OK, _( "Ok" ), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T( "ID_OK" ) );
	m_buttons_sizer->Add( m_ok_button, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5 );
	m_main_sizer->Add( m_buttons_sizer, 0, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 0 );


	m_main_sizer->Fit( this );
	m_main_sizer->SetSizeHints( this );

	SetSizer( m_main_sizer );
	Layout();

	Connect( ID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, ( wxObjectEventFunction )&SingleOptionDialog::OnCancel );
	Connect( ID_OK, wxEVT_COMMAND_BUTTON_CLICKED, ( wxObjectEventFunction )&SingleOptionDialog::OnOk );
}
开发者ID:tvo,项目名称:springlobby,代码行数:96,代码来源:mmoptionwindows.cpp

示例4: wxFrame

MainFrame::MainFrame( bool _demoMode ) : wxFrame(NULL, -1, wxT("")), demoMode(_demoMode)
{
	if (demoMode)
	SetTitle( wxT("Mode demonstration - ") + StudentsNames);
	else
	SetTitle( wxT("Mode developpement - ") + StudentsNames);

	wxGridSizer * droite = NULL;
	if (demoMode)
	{
		droite = new wxGridSizer(2);
		{
			miniPanels[0] = new Panel3D(this, &engine, Renderer::Filaire);
			miniPanels[0]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[0], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[1] = new Panel3D(this, &engine, Renderer::FilaireCache);
			miniPanels[1]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[1], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[2] = new Panel3D(this, &engine, Renderer::FacePleine);
			miniPanels[2]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[2], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[3] = new Panel3D(this, &engine, Renderer::Lambert);
			miniPanels[3]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[3], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[4] = new Panel3D(this, &engine, Renderer::Gouraud);
			miniPanels[4]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[4], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[5] = new Panel3D(this, &engine, Renderer::Phong);
			miniPanels[5]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[5], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[6] = new Panel3D(this, &engine, Renderer::FacePleineZBuffer);
			miniPanels[6]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[6], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[7] = new Panel3D(this, &engine, Renderer::LambertZBuffer);
			miniPanels[7]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[7], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[8] = new Panel3D(this, &engine, Renderer::GouraudZBuffer);
			miniPanels[8]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[8], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
		{
			miniPanels[9] = new Panel3D(this, &engine, Renderer::PhongZBuffer);
			miniPanels[9]->SetSizeHints(160, 120); // taille minimale de la zone de dessin (format 4/3)
			droite->Add(miniPanels[9], 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
		}
	}

	// positionnement automatique via un flex grid sizer (1 ligne, 2 colonnes)
	wxFlexGridSizer * sizer = new wxFlexGridSizer(1, 2, 5, 5);
	sizer->AddGrowableRow(0);
	sizer->AddGrowableCol(0);
	SetSizer(sizer);

	wxBoxSizer * gauche = new wxBoxSizer(wxVERTICAL);
	{
		panel = new Panel3D(this, &engine, Renderer::Filaire);
		panel->SetSizeHints(640, 480); // taille de la zone de dessin (format 4/3)
		gauche->Add(panel, 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL , 2);
	}
	{ // attention, cet objet doit être créé après les mini et le panel
		Piloter * piloter = new Piloter( this, &engine );
		gauche->Add(piloter, 0, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL, 2);
	}

	sizer->Add(gauche);
	if (demoMode)
		sizer->Add(droite);

	SetAutoLayout(TRUE); // dimensionnement automatique
	Fit(); // ajuster les dimensions de la fenêtre au contenu

	FrameCounter::IncFrameCount();
}
开发者ID:PengBAI,项目名称:project_algo_graphique,代码行数:89,代码来源:MainFrame.cpp

示例5: LoadBitmap


//.........这里部分代码省略.........
   headerSizer->Add(aboutButton, 0, wxALIGN_LEFT|wxALL, bsize);
   headerSizer->Add(gmatTextSizer, 0, wxALIGN_LEFT|wxALL, bsize);

   //-----------------------------------------------------------------
   // now Links and Resources
   //-----------------------------------------------------------------
   wxStaticText *resourcesText =
      new wxStaticText(this, -1, "Links and Resources");
   resourcesText->SetOwnFont(font1);
   resourcesText->SetOwnForegroundColour(gmatColor);
   wxBoxSizer *resourcesSizer = new wxBoxSizer(wxVERTICAL);
   resourcesSizer->Add(resourcesText, 0, wxALIGN_LEFT|wxALL, bsize);
   resourcesSizer->AddSpacer(bsize*2);
   // now Links
   pConfig = (wxFileConfig *) wxConfigBase::Get();
   wxString configLocWelcome = "/Welcome/Links";
   #ifdef __WXMAC__
      configLocWelcome = configLocWelcome + "/Online";
   #endif
   resourcesSizer->Add(FillGroup(pConfig, configLocWelcome, "", 3, ID_HELP, false),
                       0, wxALIGN_LEFT|wxALL, bsize*2);

   //-----------------------------------------------------------------
   // now Sample Projects
   //-----------------------------------------------------------------
   resourcesSizer->Add(FillGroup(pConfig, "/Welcome/Samples", "", 3, ID_FILE, false),
                       0, wxALIGN_LEFT|wxALL, bsize*2);

   //-----------------------------------------------------------------
   // now Getting Started
   //-----------------------------------------------------------------
   wxStaticText *getStartedText =
      new wxStaticText(this, -1, "Getting Started");
   getStartedText->SetOwnFont(font1);
   getStartedText->SetOwnForegroundColour(gmatColor);
   wxBoxSizer *gettingStartedSizer = new wxBoxSizer(wxVERTICAL);
   gettingStartedSizer->Add(getStartedText, 0, wxALIGN_LEFT|wxALL, bsize);
   gettingStartedSizer->AddSpacer(bsize*2);
   wxString configLoc = "/GettingStarted/Tutorials";
   #ifdef __WXMAC__
      configLoc = configLoc + "/Online";
   #endif
   gettingStartedSizer->Add(FillGroup(pConfig, configLoc, "/GettingStarted/Tutorials/Icons",
                                      1, ID_HELP, false), 0, wxALIGN_LEFT|wxALL, bsize*2);
   //gettingStartedSizer->AddSpacer(bsize*2);

   //-----------------------------------------------------------------
   // now recent scripts
   //-----------------------------------------------------------------
   wxStaticText *recentScriptsText =
      new wxStaticText(this, -1, "Recent Scripts");
   recentScriptsText->SetOwnFont(font1);
   recentScriptsText->SetOwnForegroundColour(gmatColor);
   wxBoxSizer *recentSizer = new wxBoxSizer(wxVERTICAL);
   recentSizer->Add(recentScriptsText, 0, wxALIGN_LEFT|wxALL, bsize);
   recentSizer->AddSpacer(bsize*2);
   // add the recent scripts
   pConfig = (wxFileConfig *) GmatAppData::Instance()->GetPersonalizationConfig();
   recentSizer->Add(FillGroup(pConfig, "/RecentFiles", "", 1, ID_BUTTON_RECENT, true, true),
                    0, wxALIGN_LEFT|wxALL, bsize*2);


   //-----------------------------------------------------------------
   // Now put it all together
   //-----------------------------------------------------------------
   wxBoxSizer *contentSizer = new wxBoxSizer(wxHORIZONTAL);
   contentSizer->Add(recentSizer, 0, wxALIGN_LEFT|wxALL, bsize*2);
   line1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
   contentSizer->Add(line1, 0, wxGROW|wxALIGN_CENTRE, 20);
   contentSizer->Add(gettingStartedSizer, 1, wxGROW|wxALIGN_LEFT|wxALL, bsize*2);

   wxSizer *theMiddleSizer = (wxSizer*)(new wxBoxSizer(wxVERTICAL));
   theMiddleSizer->Add(headerSizer, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize*2);
   line1 = new wxStaticLine(this);
   theMiddleSizer->Add(line1, 0, wxEXPAND|wxALIGN_CENTRE, bsize*2);
   theMiddleSizer->Add(contentSizer, 1, wxGROW|wxALIGN_CENTRE|wxALL);
   line1 = new wxStaticLine(this);
   theMiddleSizer->Add(line1, 0, wxEXPAND|wxALIGN_CENTRE, bsize*2);
   theMiddleSizer->Add(resourcesSizer, 0, wxALIGN_LEFT|wxEXPAND|wxALL, bsize*2);
   line1 = new wxStaticLine(this);
   theMiddleSizer->Add(line1, 0, wxEXPAND|wxALIGN_CENTRE, bsize*2);

   wxCheckBox *cbShow = new wxCheckBox( this, ID_CHECKBOX, wxT("&Show Welcome Page On Startup"));
   wxString showWelcomePanel;
   pConfig->Read("/Main/ShowWelcomeOnStart", &showWelcomePanel, "true");
   cbShow->SetValue( showWelcomePanel.Lower() == "true" );
   theMiddleSizer->Add(cbShow, 0, wxALIGN_LEFT|wxALL, bsize*2);

   wxSizer *thePanelSizer = new wxBoxSizer(wxVERTICAL);
   thePanelSizer->Add(theMiddleSizer, 0, wxALIGN_LEFT|wxGROW|wxALL, bsize*2);
   SetSizer(thePanelSizer);
   thePanelSizer->SetSizeHints(this);
   
   // Set GMAT main icon
   GmatAppData::Instance()->SetIcon(this, "WelcomePanel");
   
   #ifdef DEBUG_CREATE
   MessageInterface::ShowMessage("WelcomePanel::Create() leaving\n");
   #endif
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:101,代码来源:WelcomePanel.cpp

示例6: PrefsPanelBase

/* Map3DPrefsPanel::Map3DPrefsPanel
 * Map3DPrefsPanel class constructor
 *******************************************************************/
Map3DPrefsPanel::Map3DPrefsPanel(wxWindow* parent) : PrefsPanelBase(parent)
{
	// Create sizer
	wxBoxSizer* psizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(psizer);

	// Create frame+sizer
	wxStaticBox* frame = new wxStaticBox(this, -1, "Map Editor 3D Mode Preferences");
	wxStaticBoxSizer* fsizer = new wxStaticBoxSizer(frame, wxVERTICAL);
	psizer->Add(fsizer, 1, wxEXPAND|wxALL, 4);

	wxGridBagSizer* gbsizer = new wxGridBagSizer(8, 8);
	fsizer->Add(gbsizer, 0, wxEXPAND|wxALL, 4);

	// Render distance
	gbsizer->Add(new wxStaticText(this, -1, "Render distance:"), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	slider_max_render_dist = new wxSlider(this, -1, 1, 1, 20, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS);
	gbsizer->Add(slider_max_render_dist, wxGBPosition(0, 1), wxDefaultSpan, wxEXPAND);
	label_render_dist = new wxStaticText(this, -1, "00000");
	label_render_dist->SetInitialSize(wxSize(label_render_dist->GetSize().x, -1));
	gbsizer->Add(label_render_dist, wxGBPosition(0, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	cb_distance_unlimited = new wxCheckBox(this, -1, "Unlimited");
	gbsizer->Add(cb_distance_unlimited, wxGBPosition(0, 3), wxDefaultSpan, wxEXPAND);

	// Thing Render distance
	gbsizer->Add(new wxStaticText(this, -1, "Thing render distance:"), wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	slider_max_thing_dist = new wxSlider(this, -1, 1, 1, 20, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS);
	gbsizer->Add(slider_max_thing_dist, wxGBPosition(1, 1), wxDefaultSpan, wxEXPAND);
	label_thing_dist = new wxStaticText(this, -1, "00000");
	gbsizer->Add(label_thing_dist, wxGBPosition(1, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	cb_max_thing_dist_lock = new wxCheckBox(this, -1, "Lock");
	gbsizer->Add(cb_max_thing_dist_lock, wxGBPosition(1, 3), wxDefaultSpan, wxEXPAND);
	gbsizer->AddGrowableCol(1, 1);

	wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL);
	fsizer->Add(hbox, 0, wxEXPAND|wxALL, 4);

	// Adaptive render distance
	cb_render_dist_adaptive = new wxCheckBox(this, -1, "Adaptive render distance");
	hbox->Add(cb_render_dist_adaptive, 0, wxEXPAND|wxRIGHT, 10);

	hbox->Add(new wxStaticText(this, -1, "Target framerate:"), 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4);
	spin_adaptive_fps = new wxSpinCtrl(this, -1, "30", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, 10, 100, 30);
	hbox->Add(spin_adaptive_fps, 0, wxEXPAND);

	fsizer->Add(new wxStaticLine(this, -1, wxDefaultPosition, wxDefaultSize, wxHORIZONTAL), 0, wxEXPAND|wxTOP|wxBOTTOM, 4);

	// Render sky preview
	cb_render_sky = new wxCheckBox(this, -1, "Render sky preview");
	fsizer->Add(cb_render_sky, 0, wxEXPAND|wxALL, 4);

	// Show distance
	cb_show_distance = new wxCheckBox(this, -1, "Show distance under crosshair");
	fsizer->Add(cb_show_distance, 0, wxEXPAND|wxALL, 4);

	// Invert mouse y
	cb_invert_y = new wxCheckBox(this, -1, "Invert mouse Y axis");
	fsizer->Add(cb_invert_y, 0, wxEXPAND|wxALL, 4);

	// Shade orthogonal lines
	cb_shade_orthogonal = new wxCheckBox(this, -1, "Shade orthogonal lines");
	fsizer->Add(cb_shade_orthogonal, 0, wxEXPAND | wxALL, 4);


	// Bind events
	slider_max_render_dist->Bind(wxEVT_SLIDER, &Map3DPrefsPanel::onSliderMaxRenderDistChanged, this);
	slider_max_thing_dist->Bind(wxEVT_SLIDER, &Map3DPrefsPanel::onSliderMaxThingDistChanged, this);
	cb_max_thing_dist_lock->Bind(wxEVT_CHECKBOX, &Map3DPrefsPanel::onCBLockThingDistChanged, this);
	cb_distance_unlimited->Bind(wxEVT_CHECKBOX, &Map3DPrefsPanel::onCBDistUnlimitedChanged, this);
}
开发者ID:devinacker,项目名称:SLADE,代码行数:73,代码来源:Map3DPrefsPanel.cpp

示例7: Portuguese

void InterfaceConfigPane::InitializeGUI()
{
	// GUI language arrayStrings
	// keep these in sync with the langIds array at the beginning of this file
	m_interface_lang_strings.Add(_("<System Language>"));
	m_interface_lang_strings.Add(L"Catal\u00E0");                                       // Catalan
	m_interface_lang_strings.Add(L"\u010Ce\u0161tina");                                 // Czech
	m_interface_lang_strings.Add(L"Deutsch");                                           // German
	m_interface_lang_strings.Add(L"English");                                           // English
	m_interface_lang_strings.Add(L"Espa\u00F1ol");                                      // Spanish
	m_interface_lang_strings.Add(L"Fran\u00E7ais");                                     // French
	m_interface_lang_strings.Add(L"Italiano");                                          // Italian
	m_interface_lang_strings.Add(L"Magyar");                                            // Hungarian
	m_interface_lang_strings.Add(L"Nederlands");                                        // Dutch
	m_interface_lang_strings.Add(L"Norsk bokm\u00E5l");                                 // Norwegian
	m_interface_lang_strings.Add(L"Polski");                                            // Polish
	m_interface_lang_strings.Add(L"Portugu\u00EAs");                                    // Portuguese
	m_interface_lang_strings.Add(L"Portugu\u00EAs (Brasil)");                           // Portuguese (Brazil)
	m_interface_lang_strings.Add(L"Srpski");                                            // Serbian
	m_interface_lang_strings.Add(L"Svenska");                                           // Swedish
	m_interface_lang_strings.Add(L"T\u00FCrk\u00E7e");                                  // Turkish
	m_interface_lang_strings.Add(L"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC");  // Greek
	m_interface_lang_strings.Add(L"\u0420\u0443\u0441\u0441\u043A\u0438\u0439");        // Russian
	m_interface_lang_strings.Add(L"\u05E2\u05D1\u05E8\u05D9\u05EA");                    // Hebrew
	m_interface_lang_strings.Add(L"\u0627\u0644\u0639\u0631\u0628\u064A\u0629");        // Arabic
	m_interface_lang_strings.Add(L"\u0641\u0627\u0631\u0633\u06CC");                    // Farsi
	m_interface_lang_strings.Add(L"\uD55C\uAD6D\uC5B4");                                // Korean
	m_interface_lang_strings.Add(L"\u65E5\u672C\u8A9E");                                // Japanese
	m_interface_lang_strings.Add(L"\u7B80\u4F53\u4E2D\u6587");                          // Simplified Chinese
	m_interface_lang_strings.Add(L"\u7E41\u9AD4\u4E2D\u6587");                          // Traditional Chinese

	m_confirm_stop_checkbox     = new wxCheckBox(this, wxID_ANY, _("Confirm on Stop"));
	m_panic_handlers_checkbox   = new wxCheckBox(this, wxID_ANY, _("Use Panic Handlers"));
	m_osd_messages_checkbox     = new wxCheckBox(this, wxID_ANY, _("On-Screen Display Messages"));
	m_pause_focus_lost_checkbox = new wxCheckBox(this, wxID_ANY, _("Pause on Focus Lost"));
	m_interface_lang_choice     = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_interface_lang_strings);
	m_theme_choice              = new wxChoice(this, wxID_ANY);

	m_confirm_stop_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnConfirmStopCheckBoxChanged, this);
	m_panic_handlers_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnPanicHandlersCheckBoxChanged, this);
	m_osd_messages_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnOSDMessagesCheckBoxChanged, this);
	m_pause_focus_lost_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnPauseOnFocusLostCheckBoxChanged, this);
	m_interface_lang_choice->Bind(wxEVT_CHOICE, &InterfaceConfigPane::OnInterfaceLanguageChoiceChanged, this);
	m_theme_choice->Bind(wxEVT_CHOICE, &InterfaceConfigPane::OnThemeSelected, this);

	m_confirm_stop_checkbox->SetToolTip(_("Show a confirmation box before stopping a game."));
	m_panic_handlers_checkbox->SetToolTip(_("Show a message box when a potentially serious error has occurred.\nDisabling this may avoid annoying and non-fatal messages, but it may result in major crashes having no explanation at all."));
	m_osd_messages_checkbox->SetToolTip(_("Display messages over the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
	m_pause_focus_lost_checkbox->SetToolTip(_("Pauses the emulator when focus is taken away from the emulation window."));
	m_interface_lang_choice->SetToolTip(_("Change the language of the user interface.\nRequires restart."));

	wxBoxSizer* const language_sizer = new wxBoxSizer(wxHORIZONTAL);
	language_sizer->Add(new wxStaticText(this, wxID_ANY, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
	language_sizer->Add(m_interface_lang_choice, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

	wxBoxSizer* const theme_sizer = new wxBoxSizer(wxHORIZONTAL);
	theme_sizer->Add(new wxStaticText(this, wxID_ANY, _("Theme:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
	theme_sizer->Add(m_theme_choice, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
	theme_sizer->AddStretchSpacer();

	wxStaticBoxSizer* const main_static_box_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Interface Settings"));
	main_static_box_sizer->Add(m_confirm_stop_checkbox, 0, wxALL, 5);
	main_static_box_sizer->Add(m_panic_handlers_checkbox, 0, wxALL, 5);
	main_static_box_sizer->Add(m_osd_messages_checkbox, 0, wxALL, 5);
	main_static_box_sizer->Add(m_pause_focus_lost_checkbox, 0, wxALL, 5);
	main_static_box_sizer->Add(theme_sizer, 0, wxEXPAND | wxALL, 5);
	main_static_box_sizer->Add(language_sizer, 0, wxEXPAND | wxALL, 5);

	wxBoxSizer* const main_box_sizer = new wxBoxSizer(wxVERTICAL);
	main_box_sizer->Add(main_static_box_sizer, 0, wxEXPAND | wxALL, 5);

	SetSizer(main_box_sizer);
}
开发者ID:JanDevDE,项目名称:dolphin,代码行数:73,代码来源:InterfaceConfigPane.cpp

示例8: Create

ButterflyPanel::ButterflyPanel(wxWindow* parent)
{
	//(*Initialize(ButterflyPanel)
	wxChoice* Choice_Butterfly_Colors;
	wxStaticText* StaticText175;
	wxBitmapButton* BitmapButton_ButterflyStyle;
	wxTextCtrl* TextCtrl16;
	wxStaticText* StaticText26;
	wxSlider* Slider_Butterfly_Chunks;
	wxStaticText* StaticText58;
	wxStaticText* StaticText27;
	wxBitmapButton* BitmapButton8;
	wxBitmapButton* BitmapButton1;
	wxBitmapButton* BitmapButton_ButterflySkip;
	wxTextCtrl* TextCtrl18;
	wxTextCtrl* TextCtrl17;
	wxBitmapButton* BitmapButton_ButterflyColors;
	wxStaticText* StaticText28;
	wxSlider* Slider8;
	wxTextCtrl* TextCtrl25;
	wxChoice* Choice_Butterfly_Direction;
	wxFlexGridSizer* FlexGridSizer36;
	wxSlider* Slider_Butterfly_Style;
	wxStaticText* StaticText25;
	wxBitmapButton* BitmapButton_ButterflyChunks;
	wxSlider* Slider_Butterfly_Skip;

	Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("wxID_ANY"));
	FlexGridSizer36 = new wxFlexGridSizer(0, 4, 0, 0);
	FlexGridSizer36->AddGrowableCol(1);
	StaticText25 = new wxStaticText(this, wxID_ANY, _("Colors"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer36->Add(StaticText25, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2);
	Choice_Butterfly_Colors = new wxChoice(this, ID_CHOICE_Butterfly_Colors, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE_Butterfly_Colors"));
	Choice_Butterfly_Colors->SetSelection( Choice_Butterfly_Colors->Append(_("Rainbow")) );
	Choice_Butterfly_Colors->Append(_("Palette"));
	FlexGridSizer36->Add(Choice_Butterfly_Colors, 1, wxTOP|wxBOTTOM|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer36->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BitmapButton_ButterflyColors = new wxBitmapButton(this, ID_BITMAPBUTTON_CHOICE_Butterfly_Color, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON_CHOICE_Butterfly_Color"));
	BitmapButton_ButterflyColors->SetDefault();
	BitmapButton_ButterflyColors->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
	FlexGridSizer36->Add(BitmapButton_ButterflyColors, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
	StaticText26 = new wxStaticText(this, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer36->Add(StaticText26, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2);
	Slider_Butterfly_Style = new wxSlider(this, ID_SLIDER_Butterfly_Style, 1, 1, 10, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_SLIDER_Butterfly_Style"));
	FlexGridSizer36->Add(Slider_Butterfly_Style, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
	TextCtrl16 = new wxTextCtrl(this, IDD_TEXTCTRL_Butterfly_Style, _("1"), wxDefaultPosition, wxDLG_UNIT(this,wxSize(20,-1)), 0, wxDefaultValidator, _T("IDD_TEXTCTRL_Butterfly_Style"));
	TextCtrl16->SetMaxLength(1);
	FlexGridSizer36->Add(TextCtrl16, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BitmapButton_ButterflyStyle = new wxBitmapButton(this, ID_BITMAPBUTTON_SLIDER_Butterfly_Style, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON_SLIDER_Butterfly_Style"));
	BitmapButton_ButterflyStyle->SetDefault();
	BitmapButton_ButterflyStyle->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
	FlexGridSizer36->Add(BitmapButton_ButterflyStyle, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
	StaticText27 = new wxStaticText(this, wxID_ANY, _("Bkgrd Chunks"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer36->Add(StaticText27, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2);
	Slider_Butterfly_Chunks = new wxSlider(this, ID_SLIDER_Butterfly_Chunks, 1, 1, 10, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_SLIDER_Butterfly_Chunks"));
	FlexGridSizer36->Add(Slider_Butterfly_Chunks, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
	TextCtrl17 = new wxTextCtrl(this, IDD_TEXTCTRL_Butterfly_Chunks, _("1"), wxDefaultPosition, wxDLG_UNIT(this,wxSize(20,-1)), 0, wxDefaultValidator, _T("IDD_TEXTCTRL_Butterfly_Chunks"));
	TextCtrl17->SetMaxLength(2);
	FlexGridSizer36->Add(TextCtrl17, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BitmapButton_ButterflyChunks = new wxBitmapButton(this, ID_BITMAPBUTTON_SLIDER_Butterfly_Chunks, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON_SLIDER_Butterfly_Chunks"));
	BitmapButton_ButterflyChunks->SetDefault();
	BitmapButton_ButterflyChunks->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
	FlexGridSizer36->Add(BitmapButton_ButterflyChunks, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
	StaticText28 = new wxStaticText(this, wxID_ANY, _("Bkgrd Skip"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer36->Add(StaticText28, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2);
	Slider_Butterfly_Skip = new wxSlider(this, ID_SLIDER_Butterfly_Skip, 2, 2, 10, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_SLIDER_Butterfly_Skip"));
	FlexGridSizer36->Add(Slider_Butterfly_Skip, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
	TextCtrl18 = new wxTextCtrl(this, IDD_TEXTCTRL_Butterfly_Skip, _("2"), wxDefaultPosition, wxDLG_UNIT(this,wxSize(20,-1)), 0, wxDefaultValidator, _T("IDD_TEXTCTRL_Butterfly_Skip"));
	TextCtrl18->SetMaxLength(2);
	FlexGridSizer36->Add(TextCtrl18, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BitmapButton1 = new wxBitmapButton(this, ID_BITMAPBUTTON15, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON15"));
	BitmapButton1->SetDefault();
	BitmapButton1->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
	FlexGridSizer36->Add(BitmapButton1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	StaticText175 = new wxStaticText(this, wxID_ANY, _("Speed"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer36->Add(StaticText175, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
	Slider8 = new wxSlider(this, ID_SLIDER_Butterfly_Speed, 10, 0, 100, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_SLIDER_Butterfly_Speed"));
	FlexGridSizer36->Add(Slider8, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
	TextCtrl25 = new wxTextCtrl(this, IDD_TEXTCTRL_Butterfly_Speed, _("10"), wxDefaultPosition, wxDLG_UNIT(this,wxSize(20,-1)), 0, wxDefaultValidator, _T("IDD_TEXTCTRL_Butterfly_Speed"));
	TextCtrl25->SetMaxLength(3);
	FlexGridSizer36->Add(TextCtrl25, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
	BitmapButton_ButterflySkip = new wxBitmapButton(this, ID_BITMAPBUTTON_SLIDER_Butterfly_Skip, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("ID_BITMAPBUTTON_SLIDER_Butterfly_Skip"));
	BitmapButton_ButterflySkip->SetDefault();
	BitmapButton_ButterflySkip->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
	FlexGridSizer36->Add(BitmapButton_ButterflySkip, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 1);
	StaticText58 = new wxStaticText(this, wxID_ANY, _("Direction"), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
	FlexGridSizer36->Add(StaticText58, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
	Choice_Butterfly_Direction = new wxChoice(this, ID_CHOICE_Butterfly_Direction, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE_Butterfly_Direction"));
	Choice_Butterfly_Direction->SetSelection( Choice_Butterfly_Direction->Append(_("Normal")) );
	Choice_Butterfly_Direction->Append(_("Reverse"));
	FlexGridSizer36->Add(Choice_Butterfly_Direction, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
	FlexGridSizer36->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BitmapButton8 = new wxBitmapButton(this, ID_BITMAPBUTTON9, padlock16x16_blue_xpm, wxDefaultPosition, wxSize(13,13), wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON9"));
	BitmapButton8->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
	FlexGridSizer36->Add(BitmapButton8, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	SetSizer(FlexGridSizer36);
	FlexGridSizer36->Fit(this);
	FlexGridSizer36->SetSizeHints(this);

	Connect(ID_BITMAPBUTTON_CHOICE_Butterfly_Color,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ButterflyPanel::OnLockButtonClick);
//.........这里部分代码省略.........
开发者ID:rickcowan,项目名称:xLights,代码行数:101,代码来源:ButterflyPanel.cpp

示例9: wxCheckBox

void WiiConfigPane::InitializeGUI()
{
	m_aspect_ratio_strings.Add("4:3");
	m_aspect_ratio_strings.Add("16:9");

	m_system_language_strings.Add(_("Japanese"));
	m_system_language_strings.Add(_("English"));
	m_system_language_strings.Add(_("German"));
	m_system_language_strings.Add(_("French"));
	m_system_language_strings.Add(_("Spanish"));
	m_system_language_strings.Add(_("Italian"));
	m_system_language_strings.Add(_("Dutch"));
	m_system_language_strings.Add(_("Simplified Chinese"));
	m_system_language_strings.Add(_("Traditional Chinese"));
	m_system_language_strings.Add(_("Korean"));

	m_screensaver_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Screen Saver"));
	m_wiispeak_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Wii Speak Dummy Support"));
	m_pal60_mode_checkbox = new wxCheckBox(this, wxID_ANY, _("Use PAL60 Mode (EuRGB60)"));
	m_aspect_ratio_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_aspect_ratio_strings);
	m_system_language_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_system_language_strings);
	m_sd_card_checkbox = new wxCheckBox(this, wxID_ANY, _("Insert SD Card"));
	m_connect_keyboard_checkbox = new wxCheckBox(this, wxID_ANY, _("Connect USB Keyboard"));

	m_screensaver_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnScreenSaverCheckBoxChanged, this);
	m_wiispeak_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnWiiSpeakCheckBoxChanged, this);
	m_pal60_mode_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnPAL60CheckBoxChanged, this);
	m_aspect_ratio_choice->Bind(wxEVT_CHOICE, &WiiConfigPane::OnAspectRatioChoiceChanged, this);
	m_system_language_choice->Bind(wxEVT_CHOICE, &WiiConfigPane::OnSystemLanguageChoiceChanged, this);
	m_sd_card_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnSDCardCheckBoxChanged, this);
	m_connect_keyboard_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnConnectKeyboardCheckBoxChanged, this);

	m_screensaver_checkbox->SetToolTip(_("Dims the screen after five minutes of inactivity."));
	m_wiispeak_checkbox->SetToolTip(_("Adds Dummy Support for WiiSpeak to allow games that requires it to boot properly."));
	m_pal60_mode_checkbox->SetToolTip(_("Sets the Wii display mode to 60Hz (480i) instead of 50Hz (576i) for PAL games.\nMay not work for all games."));
	m_system_language_choice->SetToolTip(_("Sets the Wii system language."));
	m_sd_card_checkbox->SetToolTip(_("Saved to /Wii/sd.raw (default size is 128mb)"));
	m_connect_keyboard_checkbox->SetToolTip(_("May cause slow down in Wii Menu and some games."));

	wxGridBagSizer* const misc_settings_grid_sizer = new wxGridBagSizer();
	misc_settings_grid_sizer->Add(m_screensaver_checkbox, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
	misc_settings_grid_sizer->Add(m_pal60_mode_checkbox, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
	misc_settings_grid_sizer->Add(new wxStaticText(this, wxID_ANY, _("Aspect Ratio:")), wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
	misc_settings_grid_sizer->Add(m_aspect_ratio_choice, wxGBPosition(2, 1), wxDefaultSpan, wxALL, 5);
	misc_settings_grid_sizer->Add(new wxStaticText(this, wxID_ANY, _("System Language:")), wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
	misc_settings_grid_sizer->Add(m_system_language_choice, wxGBPosition(3, 1), wxDefaultSpan, wxALL, 5);

	wxStaticBoxSizer* const misc_settings_static_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Misc Settings"));
	misc_settings_static_sizer->Add(misc_settings_grid_sizer);

	wxStaticBoxSizer* const device_settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Device Settings"));
	device_settings_sizer->Add(m_sd_card_checkbox, 0, wxALL, 5);
	device_settings_sizer->Add(m_connect_keyboard_checkbox, 0, wxALL, 5);
	device_settings_sizer->Add(m_wiispeak_checkbox, 0, wxALL, 5);

	wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
	main_sizer->Add(misc_settings_static_sizer, 0, wxEXPAND | wxALL, 5);
	main_sizer->Add(device_settings_sizer, 0, wxEXPAND | wxALL, 5);

	SetSizer(main_sizer);
}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:61,代码来源:WiiConfigPane.cpp

示例10: GetParentForModalDialog


//.........这里部分代码省略.........
        return false;
    }

#if wxUSE_CONFIG
    if (wxConfig::Get(false))
    {
        wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ViewStyle"),
                              &ms_lastViewStyle);
        wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ShowHidden"),
                              &ms_lastShowHidden);
    }
#endif

    if ((m_dir.empty()) || (m_dir == wxT(".")))
    {
        m_dir = wxGetCwd();
        if (m_dir.empty())
            m_dir = wxFILE_SEP_PATH;
    }

    const size_t len = m_dir.length();
    if ((len > 1) && (wxEndsWithPathSeparator(m_dir)))
        m_dir.Remove( len-1, 1 );

    m_filterExtension = wxEmptyString;

    // layout

    const bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);

    wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );

    wxBoxSizer *buttonsizer = new wxBoxSizer( wxHORIZONTAL );
    AddBitmapButton( ID_LIST_MODE, wxART_LIST_VIEW,
                     _("View files as a list view"), buttonsizer );
    AddBitmapButton( ID_REPORT_MODE, wxART_REPORT_VIEW,
                     _("View files as a detailed view"), buttonsizer );
    buttonsizer->Add( 30, 5, 1 );
    m_upDirButton = AddBitmapButton( ID_UP_DIR, wxART_GO_DIR_UP,
                                     _("Go to parent directory"), buttonsizer );

#ifndef __DOS__ // VS: Home directory is meaningless in MS-DOS...
    AddBitmapButton( ID_HOME_DIR, wxART_GO_HOME,
                     _("Go to home directory"), buttonsizer );
    buttonsizer->Add( 20, 20 );
#endif //!__DOS__

    m_newDirButton = AddBitmapButton( ID_NEW_DIR, wxART_NEW_DIR,
                                      _("Create new directory"), buttonsizer );

    if (is_pda)
        mainsizer->Add( buttonsizer, wxSizerFlags().Expand() );
    else
        mainsizer->Add( buttonsizer, wxSizerFlags().Expand()
                                                   .Border( wxLEFT | wxRIGHT | wxTOP ) );

    long style2 = 0;
    if ( HasFdFlag(wxFD_MULTIPLE) )
        style2 |= wxFC_MULTIPLE;

    m_filectrl = new wxGenericFileCtrl( this, ID_FILE_CTRL,
                                        m_dir, defaultFile,
                                        wildCard,
                                        style2,
                                        wxDefaultPosition, wxSize(540,200)
                                        );

    m_filectrl->ShowHidden( ms_lastShowHidden );

    if (ms_lastViewStyle == wxLC_LIST)
    {
        m_filectrl->ChangeToListMode();
    }
    else if (ms_lastViewStyle == wxLC_REPORT)
    {
        m_filectrl->ChangeToReportMode();
    }

    mainsizer->Add(m_filectrl, wxSizerFlags(1).Expand().HorzBorder());

    wxSizer *bsizer = CreateButtonSizer(wxOK | wxCANCEL);
    if ( bsizer )
    {
        if (is_pda)
            mainsizer->Add(bsizer, wxSizerFlags().Expand().Border());
        else
            mainsizer->Add(bsizer, wxSizerFlags().Expand().DoubleBorder());
    }

    SetSizer( mainsizer );

    if (!is_pda)
    {
        mainsizer->SetSizeHints( this );

        Centre( wxBOTH );
    }

    return true;
}
开发者ID:781155640,项目名称:wxWidgets,代码行数:101,代码来源:filedlgg.cpp

示例11: wxPanel

CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook, wxWindowID iTaskWindowID, int iTaskWindowFlags, wxWindowID iListWindowID, int iListWindowFlags) :
    wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
{
    m_bProcessingTaskRenderEvent = false;
    m_bProcessingListRenderEvent = false;

    m_bForceUpdateSelection = true;
    m_bIgnoreUIEvents = false;

    //
    // Setup View
    //
    m_pTaskPane = NULL;
    m_pListPane = NULL;

    SetName(GetViewName());
    SetAutoLayout(TRUE);

    wxFlexGridSizer* itemFlexGridSizer = new wxFlexGridSizer(2, 0, 0);
    wxASSERT(itemFlexGridSizer);

    itemFlexGridSizer->AddGrowableRow(0);
    itemFlexGridSizer->AddGrowableCol(1);

    m_pTaskPane = new CBOINCTaskCtrl(this, iTaskWindowID, iTaskWindowFlags);
    wxASSERT(m_pTaskPane);

    m_pListPane = new CBOINCListCtrl(this, iListWindowID, iListWindowFlags);
    wxASSERT(m_pListPane);
    
    itemFlexGridSizer->Add(m_pTaskPane, 1, wxGROW|wxALL, 1);
    itemFlexGridSizer->Add(m_pListPane, 1, wxGROW|wxALL, 1);

    SetSizer(itemFlexGridSizer);

    UpdateSelection();

#if USE_NATIVE_LISTCONTROL
    m_pListPane->PushEventHandler(new MyEvtHandler(m_pListPane));
#else
    (m_pListPane->GetMainWin())->PushEventHandler(new MyEvtHandler(m_pListPane));
#endif

    m_iProgressColumn = -1;
    m_iSortColumn = -1;
    m_bReverseSort = false;

    m_SortArrows = new wxImageList(16, 16, true);
    m_SortArrows->Add( wxIcon( sortascending_xpm ) );
    m_SortArrows->Add( wxIcon( sortdescending_xpm ) );
    m_pListPane->SetImageList(m_SortArrows, wxIMAGE_LIST_SMALL);

#if BASEVIEW_STRIPES    
    m_pWhiteBackgroundAttr = new wxListItemAttr(
        wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT),
        wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW),
        wxNullFont
    );
    m_pGrayBackgroundAttr = new wxListItemAttr(
        wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT),
        wxColour(240, 240, 240),
        wxNullFont
    );
#endif

}
开发者ID:Milkyway-at-home,项目名称:BOINC,代码行数:66,代码来源:BOINCBaseView.cpp

示例12: m_Data

wxsSimpleFontEditorDlg::wxsSimpleFontEditorDlg(wxWindow* parent,wxsFontData& Data,wxWindowID id):
    m_Data(Data)
{
    //(*Initialize(wxsSimpleFontEditorDlg)
    wxBoxSizer* BoxSizer4;
    wxStaticBoxSizer* StaticBoxSizer2;
    wxBoxSizer* BoxSizer1;
    wxFlexGridSizer* FlexGridSizer1;
    wxBoxSizer* BoxSizer3;
    wxStdDialogButtonSizer* StdDialogButtonSizer1;

    Create(parent, id, _("Font settings"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
    FlexGridSizer1 = new wxFlexGridSizer(0, 1, 0, 0);
    BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
    StaticBoxSizer1 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Current font"));
    FlexGridSizer2 = new wxFlexGridSizer(0, 0, 0, 0);
    FlexGridSizer2->AddGrowableCol(0);
    FlexGridSizer2->AddGrowableRow(0);
    FontDescription = new wxStaticText(this, ID_STATICTEXT1, _("-- None --"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
    FlexGridSizer2->Add(FontDescription, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticBoxSizer1->Add(FlexGridSizer2, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticLine2 = new wxStaticLine(this, ID_STATICLINE2, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL, _T("ID_STATICLINE2"));
    StaticBoxSizer1->Add(StaticLine2, 0, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer2 = new wxBoxSizer(wxVERTICAL);
    Button1 = new wxButton(this, ID_BUTTON1, _("Change"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
    BoxSizer2->Add(Button1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    Button3 = new wxButton(this, ID_BUTTON3, _("Clear"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
    BoxSizer2->Add(Button3, 1, wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticLine1 = new wxStaticLine(this, ID_STATICLINE1, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("ID_STATICLINE1"));
    BoxSizer2->Add(StaticLine1, 0, wxTOP|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    Button2 = new wxButton(this, ID_BUTTON2, _("Advanced"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
    BoxSizer2->Add(Button2, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticBoxSizer1->Add(BoxSizer2, 0, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer4->Add(StaticBoxSizer1, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    FlexGridSizer1->Add(BoxSizer4, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
    StaticBoxSizer2 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Test area"));
    TestArea = new wxTextCtrl(this, ID_TEXTCTRL1, _("This is sample text"), wxDefaultPosition, wxSize(275,71), wxTE_MULTILINE, wxDefaultValidator, _T("ID_TEXTCTRL1"));
    StaticBoxSizer2->Add(TestArea, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
    FlexGridSizer1->Add(StaticBoxSizer2, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
    StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Note:"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE, _T("ID_STATICTEXT2"));
    BoxSizer3->Add(StaticText2, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("In order to provide best cross-platform compatibility\nyou should use either system-based font or multiple \nface names. You can change it in advanced options."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
    BoxSizer3->Add(StaticText3, 1, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    FlexGridSizer1->Add(BoxSizer3, 1, wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
    StdDialogButtonSizer1 = new wxStdDialogButtonSizer();
    StdDialogButtonSizer1->AddButton(new wxButton(this, wxID_OK, wxEmptyString));
    StdDialogButtonSizer1->AddButton(new wxButton(this, wxID_CANCEL, wxEmptyString));
    StdDialogButtonSizer1->Realize();
    BoxSizer1->Add(StdDialogButtonSizer1, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    FlexGridSizer1->Add(BoxSizer1, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    SetSizer(FlexGridSizer1);
    FlexGridSizer1->Fit(this);
    FlexGridSizer1->SetSizeHints(this);
    Center();

    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&wxsSimpleFontEditorDlg::OnButton1Click);
    Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&wxsSimpleFontEditorDlg::OnButton3Click);
    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&wxsSimpleFontEditorDlg::OnButton2Click);
    //*)

    m_WorkingCopy = m_Data;
    UpdateFontDescription();
}
开发者ID:Three-DS,项目名称:codeblocks-13.12,代码行数:65,代码来源:wxssimplefonteditordlg.cpp

示例13: wxBoxSizer

void WIDGET_EESCHEMA_COLOR_CONFIG::CreateControls()
{
    wxStaticText*   label;
    int             buttonId = 1800;

    m_mainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
    SetSizer( m_mainBoxSizer );

    BUTTONINDEX* groups = buttonGroups;
    wxBoxSizer* columnBoxSizer = NULL;

    while( groups->m_Buttons != NULL )
    {
        COLORBUTTON* buttons = groups->m_Buttons;

        columnBoxSizer = new wxBoxSizer( wxVERTICAL );
        m_mainBoxSizer->Add( columnBoxSizer, 1, wxALIGN_TOP | wxLEFT | wxTOP, 5 );
        wxBoxSizer* rowBoxSizer = new wxBoxSizer( wxHORIZONTAL );
        columnBoxSizer->Add( rowBoxSizer, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );

        // Add a text string to identify the column of color select buttons.
        label = new wxStaticText( this, wxID_ANY, groups->m_Name );

        // Make the column label font bold.
        wxFont font( label->GetFont() );
        font.SetWeight( wxFONTWEIGHT_BOLD );
        label->SetFont( font );

        rowBoxSizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

        while( buttons->m_Layer >= 0 )
        {
            rowBoxSizer = new wxBoxSizer( wxHORIZONTAL );
            columnBoxSizer->Add( rowBoxSizer, 0, wxGROW | wxALL, 0 );

            wxMemoryDC iconDC;
            wxBitmap   bitmap( BUTT_SIZE_X, BUTT_SIZE_Y );

            iconDC.SelectObject( bitmap );

            EDA_COLOR_T color = GetLayerColor( LAYERSCH_ID( buttons->m_Layer ) );
            currentColors[ buttons->m_Layer ] = color;

            iconDC.SetPen( *wxBLACK_PEN );

            wxBrush brush;
            ColorSetBrush( &brush, color );
            brush.SetStyle( wxBRUSHSTYLE_SOLID );
            iconDC.SetBrush( brush );
            iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );

            wxBitmapButton* bitmapButton = new wxBitmapButton(
                                    this, buttonId, bitmap, wxDefaultPosition,
                                    wxSize( BUTT_SIZE_X+8, BUTT_SIZE_Y+6 ) );
            bitmapButton->SetClientData( (void*) buttons );

            rowBoxSizer->Add( bitmapButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, 5 );

            label = new wxStaticText( this, wxID_ANY, wxGetTranslation( buttons->m_Name ) );
            rowBoxSizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, 5 );
            buttonId += 1;
            buttons++;
        }

        groups++;
    }

    Connect( 1800, buttonId - 1, wxEVT_COMMAND_BUTTON_CLICKED,
             wxCommandEventHandler( WIDGET_EESCHEMA_COLOR_CONFIG::SetColor ) );

    wxArrayString selBgColorStrings;
    selBgColorStrings.Add( _( "White" ) );
    selBgColorStrings.Add( _( "Black" ) );
    m_SelBgColor = new wxRadioBox( this, wxID_ANY, _( "Background Color" ),
                                   wxDefaultPosition, wxDefaultSize,
                                   selBgColorStrings, 1, wxRA_SPECIFY_COLS );
    m_SelBgColor->SetSelection( ( GetDrawFrame()->GetDrawBgColor() == BLACK ) ? 1 : 0 );

    if( columnBoxSizer )
    {
        // Add a spacer to improve appearance.
        columnBoxSizer->AddSpacer( 5 );
        columnBoxSizer->Add( m_SelBgColor, 1, wxGROW | wxRIGHT | wxTOP | wxBOTTOM, 5 );
    }

    currentColors[ LAYER_BACKGROUND ] =  GetDrawFrame()->GetDrawBgColor();

    // Dialog now needs to be resized, but the associated command is found elsewhere.
}
开发者ID:reportingsjr,项目名称:kicad-source-mirror,代码行数:89,代码来源:widget_eeschema_color_config.cpp

示例14: Create

MainDlg::MainDlg(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{


    //(*Initialize(MainDlg)
    wxBoxSizer* BoxSizer4;
    wxBoxSizer* BoxSizer6;
    wxBoxSizer* BoxSizer5;
    wxBoxSizer* BoxSizer2;
    wxBoxSizer* BoxSizer1;
    wxStaticBoxSizer* StaticBoxSizer1;
    wxBoxSizer* BoxSizer3;

    Create(parent, id, _("Desktop Assistant"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX, _T("id"));
    SetClientSize(wxDefaultSize);
    Move(wxDefaultPosition);
    BoxSizer1 = new wxBoxSizer(wxVERTICAL);
    BoxSizer5 = new wxBoxSizer(wxHORIZONTAL);
    StaticBitmap1 = new wxStaticBitmap(this, ID_STATICBITMAP1, wxBitmap(wxImage(_T("img\\DesktopAssistant.ico"))), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICBITMAP1"));
    BoxSizer5->Add(StaticBitmap1, 0, wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
    StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Desktop Assistant is a tool for Desktop file categorization.\nThis tool can categorize files to folders by using the rule defined beforehand. \nThe folders that stores the files is automatically created."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
    BoxSizer5->Add(StaticText1, 1, wxTOP|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer1->Add(BoxSizer5, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticBoxSizer1 = new wxStaticBoxSizer(wxVERTICAL, this, _("Select customize categorization rules"));
    BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
    m_btnNew = new wxButton(this, ID_BUTTON1, _("&New..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
    BoxSizer3->Add(m_btnNew, 0, wxTOP|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnEdit = new wxButton(this, ID_BUTTON2, _("&Edit..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
    m_btnEdit->Disable();
    BoxSizer3->Add(m_btnEdit, 0, wxTOP|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnDelete = new wxButton(this, ID_BUTTON6, _("&Delete"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON6"));
    m_btnDelete->Disable();
    BoxSizer3->Add(m_btnDelete, 0, wxTOP|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnUp = new wxButton(this, ID_BUTTON8, _("&Up"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON8"));
    m_btnUp->Disable();
    BoxSizer3->Add(m_btnUp, 1, wxTOP|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnDown = new wxButton(this, ID_BUTTON9, _("Dow&n"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON9"));
    m_btnDown->Disable();
    BoxSizer3->Add(m_btnDown, 1, wxTOP|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer3->Add(-1,-1,1, wxTOP|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer3->Add(-1,-1,1, wxTOP|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    StaticBoxSizer1->Add(BoxSizer3, 0, wxBOTTOM|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 2);
    m_pLbxCustRules = new wxCheckListBox(this, ID_CHECKLISTBOX1, wxDefaultPosition, wxSize(-1,80), 0, 0, wxLB_SINGLE|wxLB_NEEDED_SB, wxDefaultValidator, _T("ID_CHECKLISTBOX1"));
    StaticBoxSizer1->Add(m_pLbxCustRules, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer1->Add(StaticBoxSizer1, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    wxString __wxRadioBoxChoices_1[2] =
    {
    _("By file modified time"),
    _("None(Do nothing)")
    };
    m_pRbxBaseRules = new wxRadioBox(this, ID_RADIOBOX1, _("Select base categorization rules"), wxDefaultPosition, wxDefaultSize, 2, __wxRadioBoxChoices_1, 1, wxRA_VERTICAL, wxDefaultValidator, _T("ID_RADIOBOX1"));
    BoxSizer1->Add(m_pRbxBaseRules, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    m_btnPreview = new wxButton(this, ID_BUTTON7, _("&Preview"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON7"));
    BoxSizer2->Add(m_btnPreview, 0, wxTOP|wxLEFT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
    m_btnRun = new wxButton(this, ID_BUTTON4, _("&Run"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON4"));
    m_btnRun->Disable();
    BoxSizer2->Add(m_btnRun, 0, wxTOP|wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnTest = new wxButton(this, ID_BUTTON5, _("test"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON5"));
    m_btnTest->Hide();
    BoxSizer2->Add(m_btnTest, 1, wxTOP|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer1->Add(BoxSizer2, 0, wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer6 = new wxBoxSizer(wxVERTICAL);
    Notebook1 = new wxNotebook(this, ID_NOTEBOOK1, wxDefaultPosition, wxSize(600,256), wxNB_BOTTOM, _T("ID_NOTEBOOK1"));
    Notebook1->SetMaxSize(wxSize(320,200));
    m_pLcResult = new wxListCtrl(Notebook1, ID_LISTCTRL1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_HRULES|wxLC_VRULES, wxDefaultValidator, _T("ID_LISTCTRL1"));
    m_pLcFolderSize = new wxListCtrl(Notebook1, ID_LISTCTRL2, wxDefaultPosition, wxDefaultSize, wxLC_REPORT, wxDefaultValidator, _T("ID_LISTCTRL2"));
    Notebook1->AddPage(m_pLcResult, _("Preview and run result"), false);
    Notebook1->AddPage(m_pLcFolderSize, _("Folder size analysis"), false);
    BoxSizer6->Add(Notebook1, 1, wxTOP|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 2);
    BoxSizer1->Add(BoxSizer6, 1, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
    m_btnCheckUpdate = new wxButton(this, ID_BUTTON3, _("C&heck for update..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
    BoxSizer4->Add(m_btnCheckUpdate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnUiLang = new wxButton(this, ID_BUTTON10, _("U&I Language..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON10"));
    BoxSizer4->Add(m_btnUiLang, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnAbout = new wxButton(this, wxID_ABOUT, _("&About..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("wxID_ABOUT"));
    BoxSizer4->Add(m_btnAbout, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    m_btnQuit = new wxButton(this, wxID_EXIT, _("&Quit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("wxID_EXIT"));
    BoxSizer4->Add(m_btnQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    BoxSizer1->Add(BoxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    SetSizer(BoxSizer1);
    BoxSizer1->Fit(this);
    BoxSizer1->SetSizeHints(this);
    Center();

    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnNewClick);
    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnEditClick);
    Connect(ID_BUTTON6,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnDeleteClick);
    Connect(ID_BUTTON8,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnUpClick);
    Connect(ID_BUTTON9,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnDownClick);
    Connect(ID_CHECKLISTBOX1,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&MainDlg::OnBtnEditClick);
    Connect(ID_BUTTON7,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnPreviewClick);
    Connect(ID_BUTTON4,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnRunClick);
    Connect(ID_BUTTON5,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnTestClick);
    Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnCheckUpdateClick);
    Connect(ID_BUTTON10,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnUiLangClick);
    Connect(wxID_ABOUT,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnAboutClick);
    Connect(wxID_EXIT,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MainDlg::OnBtnQuitClick);
    Connect(wxID_ANY,wxEVT_INIT_DIALOG,(wxObjectEventFunction)&MainDlg::OnInit);
//.........这里部分代码省略.........
开发者ID:BrightFireOfCy001,项目名称:boomworks,代码行数:101,代码来源:MainDlg.cpp

示例15: mesh

HexagonalPrismGeneratorDialog::HexagonalPrismGeneratorDialog(Mesh &_mesh, wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size):
    mesh(_mesh)
{
	//(*Initialize(HexagonalPrismGeneratorDialog)
	wxFlexGridSizer* FlexGridSizer1;
	wxBoxSizer* BoxSizer3;
	wxBoxSizer* BoxSizer7;
	wxBoxSizer* BoxSizer2;
	wxBoxSizer* BoxSizer4;
	wxBoxSizer* BoxSizer1;
	wxBoxSizer* BoxSizer6;
	wxBoxSizer* BoxSizer5;

	Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
	SetClientSize(wxDefaultSize);
	Move(wxDefaultPosition);
	BoxSizer1 = new wxBoxSizer(wxVERTICAL);
	FlexGridSizer1 = new wxFlexGridSizer(0, 3, 0, 0);
	StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Height (unit is the diameter of the hexagon face):"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
	FlexGridSizer1->Add(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	prismHeightTextCtrl = new wxTextCtrl(this, ID_TEXTCTRL1, _("0"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
	FlexGridSizer1->Add(prismHeightTextCtrl, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer1->Add(FlexGridSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
	regularRadioButton = new wxRadioButton(this, ID_RADIOBUTTON1, _("Regular"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON1"));
	regularRadioButton->SetValue(true);
	BoxSizer3->Add(regularRadioButton, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer1->Add(BoxSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer5 = new wxBoxSizer(wxVERTICAL);
	kernPrismRadioButton = new wxRadioButton(this, ID_RADIOBUTTON2, _("Kern prism"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON2"));
	BoxSizer5->Add(kernPrismRadioButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
	StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Side face ratio:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
	BoxSizer6->Add(StaticText2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	sideFaceRatioTextBox = new wxTextCtrl(this, ID_TEXTCTRL2, _("1"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
	sideFaceRatioTextBox->Disable();
	BoxSizer6->Add(sideFaceRatioTextBox, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer5->Add(BoxSizer6, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer1->Add(BoxSizer5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer4 = new wxBoxSizer(wxVERTICAL);
	parryPlateRadioButton = new wxRadioButton(this, ID_RADIOBUTTON3, _("Parry plate"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_RADIOBUTTON3"));
	BoxSizer4->Add(parryPlateRadioButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer7 = new wxBoxSizer(wxHORIZONTAL);
	StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("Height:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
	BoxSizer7->Add(StaticText3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	parryPlateHeightTextBox = new wxTextCtrl(this, ID_TEXTCTRL3, _("1"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL3"));
	parryPlateHeightTextBox->Disable();
	BoxSizer7->Add(parryPlateHeightTextBox, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer4->Add(BoxSizer7, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer1->Add(BoxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
	generatePrismButton = new wxButton(this, ID_BUTTON_GENERATEPRISM, _("Generate"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON_GENERATEPRISM"));
	BoxSizer2->Add(generatePrismButton, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	cancelPrismGenerationButton = new wxButton(this, ID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CANCEL"));
	BoxSizer2->Add(cancelPrismGenerationButton, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer1->Add(BoxSizer2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	SetSizer(BoxSizer1);
	BoxSizer1->Fit(this);
	BoxSizer1->SetSizeHints(this);

	Connect(ID_RADIOBUTTON1,wxEVT_COMMAND_RADIOBUTTON_SELECTED,(wxObjectEventFunction)&HexagonalPrismGeneratorDialog::OnRegularRadioButtonSelect);
	Connect(ID_RADIOBUTTON2,wxEVT_COMMAND_RADIOBUTTON_SELECTED,(wxObjectEventFunction)&HexagonalPrismGeneratorDialog::OnKernPrismRadioButtonSelect);
	Connect(ID_RADIOBUTTON3,wxEVT_COMMAND_RADIOBUTTON_SELECTED,(wxObjectEventFunction)&HexagonalPrismGeneratorDialog::OnParryPlateRadioButtonSelect);
	Connect(ID_BUTTON_GENERATEPRISM,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&HexagonalPrismGeneratorDialog::OngeneratePrismClick);
	Connect(ID_CANCEL,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&HexagonalPrismGeneratorDialog::OncancelPrismGenerationClick);
	//*)
}
开发者ID:Calmarius,项目名称:diamondpowder,代码行数:67,代码来源:HexagonalPrismGeneratorDialog.cpp


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