예제 #1
0
	RunConfigDialog(wxWindow* parent, string title, string name, string params, bool custom = true) : wxDialog(parent, -1, title)
	{
		// Setup sizer
		wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
		SetSizer(sizer);

		wxGridBagSizer* gb_sizer = new wxGridBagSizer(8, 4);
		sizer->Add(gb_sizer, 1, wxEXPAND|wxALL, 10);

		// Config name
		gb_sizer->Add(new wxStaticText(this, -1, "Config Name:"), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
		text_name = new wxTextCtrl(this, -1, name);
		text_name->Enable(custom);
		gb_sizer->Add(text_name, wxGBPosition(0, 1), wxDefaultSpan, wxEXPAND);

		// Config params
		gb_sizer->Add(new wxStaticText(this, -1, "Parameters:"), wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
		text_params = new wxTextCtrl(this, -1, params);
		gb_sizer->Add(text_params, wxGBPosition(1, 1), wxDefaultSpan, wxEXPAND);

		wxStaticText* label_help = new wxStaticText(this, -1, "");
		gb_sizer->Add(label_help, wxGBPosition(2, 0), wxGBSpan(1, 2), wxEXPAND);

		gb_sizer->Add(CreateStdDialogButtonSizer(wxOK|wxCANCEL), wxGBPosition(3, 0), wxGBSpan(1, 2), wxALIGN_RIGHT);
		gb_sizer->AddGrowableCol(1);
		gb_sizer->AddGrowableRow(2);

		label_help->SetLabel("%i - Base resource archive\n%r - Resource archive(s)\n%a - Current archive\n%mn - Map name\n%mw - Map number (eg. E1M1 = 1 1, MAP02 = 02)");
		label_help->Wrap(300);
		text_params->SetInsertionPoint(0);
	}
예제 #2
0
파일: DiffPanel.cpp 프로젝트: sapient/e
void DiffPanel::OnButtonSwap(wxCommandEvent& WXUNUSED(event)) {
	m_mainSizer->Detach(m_leftEditor);
	m_mainSizer->Detach(m_rightEditor);
	EditorCtrl* temp = m_leftEditor;
	m_leftEditor = m_rightEditor;
	m_rightEditor = temp;
	m_mainSizer->Add(m_leftEditor, wxGBPosition(1,1), wxGBSpan(1,1), wxEXPAND);
	m_mainSizer->Add(m_rightEditor, wxGBPosition(1,3), wxGBSpan(1,1), wxEXPAND);

	m_leftEditor->SetScrollbarLeft(true);
	m_rightEditor->SetScrollbarLeft(false);
	m_leftEditor->SetGutterRight(false);
	m_rightEditor->SetGutterRight(true);

	m_leftMarkBar->SetEditor(m_leftEditor);
	m_rightMarkBar->SetEditor(m_rightEditor);
	
	m_diffBar->Swap();
	
	Freeze();
	m_leftTitle->SetValue(m_leftEditor->GetPath());
	m_rightTitle->SetValue(m_rightEditor->GetPath());

	m_mainSizer->Layout();

	m_leftEditor->ReDraw();
	m_rightEditor->ReDraw();
	Thaw();
}
예제 #3
0
ListSelectDialog::ListSelectDialog(wxWindow *parent, const wxString& title)
	: wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxSize(400, 420))
{
	wxBoxSizer *dlgSizer = new wxBoxSizer(wxVERTICAL);
	SetSizer(dlgSizer);

	wxPanel *mainPanel = new wxPanel(this);
	dlgSizer->Add(mainPanel, wxSizerFlags(1).Expand().Border(wxALL, 8));
	wxGridBagSizer *mainSz = new wxGridBagSizer();
	mainSz->AddGrowableCol(0, 0);
	mainSz->AddGrowableRow(0, 0);
	mainPanel->SetSizer(mainSz);

	list = new wxListBox(mainPanel, -1, wxDefaultPosition, wxDefaultSize,
		wxArrayString(), wxLB_SINGLE);
	mainSz->Add(list, wxGBPosition(0, 0), wxGBSpan(1, 2), wxEXPAND | wxALL, 4);

	wxButton *refreshButton = new wxButton(mainPanel, ID_RefreshList, _("&Refresh"));
	mainSz->Add(refreshButton, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL, 3);

	wxSizer *btnSz = CreateButtonSizer(wxOK | wxCANCEL);
	dlgSizer->Add(btnSz, wxSizerFlags(0).Border(wxBOTTOM | wxRIGHT, 8).
		Align(wxALIGN_RIGHT | wxALIGN_BOTTOM));

	SetControlEnable(this, wxID_OK, false);
}
예제 #4
0
/* MapDisplayPrefsPanel::setupThingsTab
 * Sets up the things tab
 *******************************************************************/
void MapDisplayPrefsPanel::setupThingsTab()
{
	// Add tab
	wxPanel* panel = new wxPanel(nb_pages, -1);
	nb_pages->AddPage(panel, "Things");
	wxBoxSizer* sz_border = new wxBoxSizer(wxVERTICAL);
	panel->SetSizer(sz_border);
	wxGridBagSizer* gb_sizer = new wxGridBagSizer(4, 4);
	sz_border->Add(gb_sizer, 1, wxEXPAND|wxALL, 8);
	int row = 0;

	// Thing style
	gb_sizer->Add(new wxStaticText(panel, -1, "Thing style: "), wxGBPosition(row, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	string t_types[] = { "Square", "Round", "Sprite", "Square + Sprite", "Framed Sprite" };
	choice_thing_drawtype = new wxChoice(panel, -1, wxDefaultPosition, wxDefaultSize, 5, t_types);
	gb_sizer->Add(choice_thing_drawtype, wxGBPosition(row++, 1), wxDefaultSpan, wxEXPAND);

	// When not in things mode
	gb_sizer->Add(new wxStaticText(panel, -1, "When not in things mode: "), wxGBPosition(row, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	string nonmodeshow[] = { "Hide", "Show", "Fade" };
	choice_things_always = new wxChoice(panel, -1, wxDefaultPosition, wxDefaultSize, 3, nonmodeshow);
	gb_sizer->Add(choice_things_always, wxGBPosition(row++, 1), wxDefaultSpan, wxEXPAND);

	// Shadow opacity
	gb_sizer->Add(new wxStaticText(panel, -1, "Thing shadow opacity: "), wxGBPosition(row, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	slider_thing_shadow = new wxSlider(panel, -1, thing_shadow*10, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS);
	gb_sizer->Add(slider_thing_shadow, wxGBPosition(row++, 1), wxDefaultSpan, wxEXPAND);

	// Arrow opacity
	gb_sizer->Add(new wxStaticText(panel, -1, "Thing angle arrow opacity: "), wxGBPosition(row, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	slider_thing_arrow_alpha = new wxSlider(panel, -1, thing_shadow*10, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS);
	gb_sizer->Add(slider_thing_arrow_alpha, wxGBPosition(row++, 1), wxDefaultSpan, wxEXPAND);

	// Halo width
	gb_sizer->Add(new wxStaticText(panel, -1, "Halo extra width: "), wxGBPosition(row, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	slider_halo_width = new wxSlider(panel, -1, halo_width, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS);
	gb_sizer->Add(slider_halo_width, wxGBPosition(row++, 1), wxDefaultSpan, wxEXPAND);

	// Always show angles
	cb_thing_force_dir = new wxCheckBox(panel, -1, "Always show thing angles");
	gb_sizer->Add(cb_thing_force_dir, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Colour angle arrows
	cb_thing_arrow_colour = new wxCheckBox(panel, -1, "Colour thing angle arrows");
	gb_sizer->Add(cb_thing_arrow_colour, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Force square hilight/selection
	cb_thing_overlay_square = new wxCheckBox(panel, -1, "Force square thing hilight/selection overlay");
	gb_sizer->Add(cb_thing_overlay_square, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Use zeth icons
	cb_use_zeth_icons = new wxCheckBox(panel, -1, "Use ZETH thing type icons");
	gb_sizer->Add(cb_use_zeth_icons, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	gb_sizer->AddGrowableCol(1, 1);
}
예제 #5
0
// adds a property row to the dialog 
void CDlgItemProperties::addProperty(const wxString& name, const wxString& value) {
    
    wxStaticText* staticText = new wxStaticText( m_scrolledWindow, wxID_ANY, name, wxDefaultPosition, wxDefaultSize, 0 );
    staticText->Wrap( -1 );
    m_gbSizer->Add( staticText, wxGBPosition( m_current_row, 0 ), wxGBSpan( 1, 1 ), wxALL, 3 );
    
    staticText = new wxStaticText( m_scrolledWindow, wxID_ANY, value, wxDefaultPosition, wxDefaultSize, 0 );
    staticText->Wrap( -1 );
    m_gbSizer->Add( staticText, wxGBPosition( m_current_row, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 3 );
    m_current_row++;
}
예제 #6
0
CARCodeAddEdit::CARCodeAddEdit(int _selection, std::vector<ActionReplay::ARCode>* _arCodes, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
    : wxDialog(parent, id, title, position, size, style)
    , arCodes(_arCodes)
    , selection(_selection)
{
    Bind(wxEVT_BUTTON, &CARCodeAddEdit::SaveCheatData, this, wxID_OK);

    ActionReplay::ARCode tempEntries;
    wxString currentName;

    if (selection == wxNOT_FOUND)
    {
        tempEntries.name = "";
    }
    else
    {
        currentName = StrToWxStr(arCodes->at(selection).name);
        tempEntries = arCodes->at(selection);
    }

    wxBoxSizer* sEditCheat = new wxBoxSizer(wxVERTICAL);
    wxStaticBoxSizer* sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, _("Cheat Code"));
    wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);

    wxStaticText* EditCheatNameText = new wxStaticText(this, wxID_ANY, _("Name:"));
    wxStaticText* EditCheatCodeText = new wxStaticText(this, wxID_ANY, _("Code:"));

    EditCheatName = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
    EditCheatName->SetValue(currentName);

    EntrySelection = new wxSpinButton(this);
    EntrySelection->SetRange(1, std::max((int)arCodes->size(), 1));
    EntrySelection->SetValue((int)(arCodes->size() - selection));
    EntrySelection->Bind(wxEVT_SPIN, &CARCodeAddEdit::ChangeEntry, this);

    EditCheatCode = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE);

    UpdateTextCtrl(tempEntries);

    sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 5);
    sgEntry->Add(EditCheatCodeText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 5);
    sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5);
    sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND | wxALL, 5);
    sgEntry->Add(EditCheatCode, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5);
    sgEntry->AddGrowableCol(1);
    sgEntry->AddGrowableRow(1);
    sbEntry->Add(sgEntry, 1, wxEXPAND | wxALL);

    sEditCheat->Add(sbEntry, 1, wxEXPAND | wxALL, 5);
    sEditCheat->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxALL, 5);

    SetSizerAndFit(sEditCheat);
    SetFocus();
}
예제 #7
0
Connect::Connect( 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 );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer2;
	sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Host") ), wxVERTICAL );
	
	wxGridBagSizer* gbSizer1;
	gbSizer1 = new wxGridBagSizer( 0, 0 );
	gbSizer1->SetFlexibleDirection( wxBOTH );
	gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText3 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Host:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText3->Wrap( -1 );
	gbSizer1->Add( m_staticText3, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_server = new wxComboBox( sbSizer2->GetStaticBox(), wxID_ANY, _("localhost"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_SORT ); 
	gbSizer1->Add( m_server, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
	
	m_staticText4 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText4->Wrap( -1 );
	gbSizer1->Add( m_staticText4, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	m_port = new wxComboBox( sbSizer2->GetStaticBox(), wxID_ANY, _("4000"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	m_port->Append( _("4000") );
	m_port->Append( _("23") );
	gbSizer1->Add( m_port, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
	
	
	gbSizer1->AddGrowableCol( 1 );
	
	sbSizer2->Add( gbSizer1, 1, wxALL, 5 );
	
	
	bSizer5->Add( sbSizer2, 0, wxALL|wxEXPAND, 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();
	
	bSizer5->Add( m_sdbSizer1, 0, wxALL|wxEXPAND|wxTOP, 5 );
	
	
	this->SetSizer( bSizer5 );
	this->Layout();
}
예제 #8
0
// {{{ PropertyTipWindow::PropertyTipWindow(wxWindow *parent, const DBGp::Property *prop)
PropertyTipWindow::PropertyTipWindow(wxWindow *parent, const DBGp::Property *prop) : wxPopupTransientWindow(parent) {
	wxGridBagSizer *sizer = new wxGridBagSizer(0, 3);

	SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
	SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));

	wxStaticText *name = new wxStaticText(this, -1, prop->GetFullName() + wxT(" (") + prop->GetType().GetName() + wxT(") :"));
	wxFont font(name->GetFont());
	font.SetWeight(wxFONTWEIGHT_BOLD);
	name->SetFont(font);

	sizer->Add(name, wxGBPosition(0, 0), wxGBSpan(1, 3));

	if (prop->HasChildren()) {
		/* We'll do a shallow dump, since detailed information is
		 * available through the properties panel and context menu. */
		const DBGp::Property::PropertyMap children = prop->GetChildren();
		int numShown = 0;

		sizer->Add(20, 10, wxGBPosition(1, 0));
		
		for (DBGp::Property::PropertyMap::const_iterator i = children.begin(); i != children.end(); i++) {
			DBGp::Property *child = i->second;

			sizer->Add(new wxStaticText(this, -1, child->GetName() + wxT(" (") + child->GetType().GetName() << wxT(")")), wxGBPosition(++numShown, 1));

			if (child->HasChildren()) {
				sizer->Add(new wxStaticText(this, -1, wxString(wxT(": ")) + _("<complex data structure>")), wxGBPosition(numShown, 2));
			}
			else {
				sizer->Add(new wxStaticText(this, -1, wxString(wxT(": ")) + TruncateValue(child->GetData())), wxGBPosition(numShown, 2));
			}

			// We'll truncate at an arbitrarily chosen 20 elements.
			if (numShown >= MAXIMUM_CHILD_ELEMENTS) {
				wxString rem;

				rem.Printf(_("<remaining %d element(s) omitted>"), children.size() - MAXIMUM_CHILD_ELEMENTS);
				sizer->Add(new wxStaticText(this, -1, rem), wxGBPosition(++numShown, 0), wxGBSpan(1, 3));

				break;
			}
		}
	}
	else {
		sizer->Add(new wxStaticText(this, -1, TruncateValue(prop->GetData())), wxGBPosition(0, 3));
	}

	SetAutoLayout(true);
	SetSizer(sizer);
	sizer->SetSizeHints(this);
}
예제 #9
0
/* TextureEditorPanel::createTextureControls
 * Creates/sets up a panel with controls to edit texture properties
 *******************************************************************/
wxPanel* TextureEditorPanel::createTextureControls(wxWindow* parent)
{
	wxPanel* panel = new wxPanel(parent, -1);

	// Setup tex controls panel sizer
	wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
	panel->SetSizer(sizer);

	// "Texture Properties" frame
	wxStaticBox* frame = new wxStaticBox(panel, -1, "Texture Properties");
	wxStaticBoxSizer* framesizer = new wxStaticBoxSizer(frame, wxVERTICAL);
	sizer->Add(framesizer, 0, wxEXPAND|wxALL, 4);

	wxGridBagSizer* gb_sizer = new wxGridBagSizer(4, 4);
	framesizer->Add(gb_sizer, 1, wxEXPAND|wxALL, 4);

	// Name
	text_tex_name = new wxTextCtrl(panel, -1);
	text_tex_name->SetMaxLength(8);
	gb_sizer->Add(new wxStaticText(panel, -1, "Name:"), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	gb_sizer->Add(text_tex_name, wxGBPosition(0, 1), wxGBSpan(1, 2), wxEXPAND);

	// Size
	spin_tex_width = new wxSpinCtrl(panel, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxALIGN_RIGHT|wxTE_PROCESS_ENTER, 0, SHRT_MAX);
	spin_tex_height = new wxSpinCtrl(panel, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxALIGN_RIGHT|wxTE_PROCESS_ENTER, 0, SHRT_MAX);
	gb_sizer->Add(new wxStaticText(panel, -1, "Size:"), wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	gb_sizer->Add(spin_tex_width, wxGBPosition(1, 1), wxDefaultSpan);
	gb_sizer->Add(spin_tex_height, wxGBPosition(1, 2), wxDefaultSpan);

	// Scale
	spin_tex_scalex = new wxSpinCtrl(panel, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxALIGN_RIGHT|wxTE_PROCESS_ENTER, 0, UCHAR_MAX);
	spin_tex_scaley = new wxSpinCtrl(panel, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxALIGN_RIGHT|wxTE_PROCESS_ENTER, 0, UCHAR_MAX);
	gb_sizer->Add(new wxStaticText(panel, -1, "Scale:"), wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
	gb_sizer->Add(spin_tex_scalex, wxGBPosition(2, 1), wxDefaultSpan);
	gb_sizer->Add(spin_tex_scaley, wxGBPosition(2, 2), wxDefaultSpan);

	// Scaled size
	label_scaled_size = new wxStaticText(panel, -1, "Scaled Size: N/A");
	gb_sizer->Add(label_scaled_size, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALIGN_CENTER_VERTICAL);

	// World panning
	cb_tex_world_panning = new wxCheckBox(panel, -1, "World Panning");
	gb_sizer->Add(cb_tex_world_panning, wxGBPosition(3, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);


	// Bind events
	spin_tex_scalex->Bind(wxEVT_SPINCTRL, &TextureEditorPanel::onTexScaleXChanged, this);
	spin_tex_scaley->Bind(wxEVT_SPINCTRL, &TextureEditorPanel::onTexScaleYChanged, this);
	cb_tex_world_panning->Bind(wxEVT_CHECKBOX, &TextureEditorPanel::onTexWorldPanningChanged, this);

	return panel;
}
예제 #10
0
/* MapDisplayPrefsPanel::setupGeneralTab
 * Sets up the general tab
 *******************************************************************/
void MapDisplayPrefsPanel::setupGeneralTab()
{
	// Add tab
	wxPanel* panel = new wxPanel(nb_pages, -1);
	nb_pages->AddPage(panel, "General", true);
	wxBoxSizer* sz_border = new wxBoxSizer(wxVERTICAL);
	panel->SetSizer(sz_border);
	wxGridBagSizer* gb_sizer = new wxGridBagSizer(4, 4);
	sz_border->Add(gb_sizer, 1, wxEXPAND|wxALL, 8);
	int row = 0;

	// Crosshair
	string ch[] = { "None", "Small", "Full" };
	choice_crosshair = new wxChoice(panel, -1, wxDefaultPosition, wxDefaultSize, 3, ch);
	gb_sizer->Add(new wxStaticText(panel, -1, "Cursor Crosshair:"), wxGBPosition(row, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxRIGHT);
	gb_sizer->Add(choice_crosshair, wxGBPosition(row++, 1), wxGBSpan(1, 2), wxEXPAND);

	// Texture filter
	string filters[] = { "None", "Linear", "Linear (Mipmapped)", "None (Mipmapped)" };
	choice_tex_filter = new wxChoice(panel, -1, wxDefaultPosition, wxDefaultSize, 4, filters);
	gb_sizer->Add(new wxStaticText(panel, -1, "Texture Filtering:"), wxGBPosition(row, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxRIGHT);
	gb_sizer->Add(choice_tex_filter, wxGBPosition(row++, 1), wxGBSpan(1, 2), wxEXPAND);

	// Dashed grid
	cb_grid_dashed = new wxCheckBox(panel, -1, "Dashed grid");
	gb_sizer->Add(cb_grid_dashed, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Always show line direction tabs
	cb_line_tabs_always = new wxCheckBox(panel, -1, "Always show line direction tabs");
	gb_sizer->Add(cb_line_tabs_always, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Animate hilighted object
	cb_animate_hilight = new wxCheckBox(panel, -1, "Animated hilight");
	gb_sizer->Add(cb_animate_hilight, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Animate selected objects
	cb_animate_selection = new wxCheckBox(panel, -1, "Animated selection");
	gb_sizer->Add(cb_animate_selection, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Animate tagged objects
	cb_animate_tagged = new wxCheckBox(panel, -1, "Animated tag indicator");
	gb_sizer->Add(cb_animate_tagged, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Show action lines
	cb_action_lines = new wxCheckBox(panel, -1, "Show Action Lines");
	cb_action_lines->SetToolTip("Show lines from an object with an action special to the tagged object(s) when highlighted");
	gb_sizer->Add(cb_action_lines, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	// Show help text
	cb_show_help = new wxCheckBox(panel, -1, "Show Help Text");
	gb_sizer->Add(cb_show_help, wxGBPosition(row++, 0), wxGBSpan(1, 2), wxEXPAND);

	gb_sizer->AddGrowableCol(1, 1);
}
예제 #11
0
파일: RunCmdDlg.cpp 프로젝트: joeri/e
RunCmdDlg::RunCmdDlg(wxWindow *parent)
:  wxDialog (parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) {
	SetTitle (_("Filter Through Command"));

	wxGridBagSizer* gridBagSizer = new wxGridBagSizer(5,5);

	wxStaticText* cmdLabel = new wxStaticText(this, wxID_ANY, _("Command:"));
	gridBagSizer->Add(cmdLabel, wxGBPosition(0,0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);

	m_cmdCtrl = new wxTextCtrl(this, wxID_ANY);
	gridBagSizer->Add(m_cmdCtrl, wxGBPosition(0,1), wxGBSpan(1,2), wxGROW);

	wxArrayString inputOptions;
	inputOptions.Add(_("None"));
	inputOptions.Add(_("Selection"));
	inputOptions.Add(_("Document"));
	m_inputBox = new wxRadioBox(this, wxID_ANY, _("Input"), wxDefaultPosition, wxDefaultSize, inputOptions, 1);
	m_inputBox->SetSelection(1);
	gridBagSizer->Add(m_inputBox, wxGBPosition(1,1));

	wxArrayString outputOptions;
	outputOptions.Add(_("Discard"));
	outputOptions.Add(_("Replace Selection"));
	outputOptions.Add(_("Replace Document"));
	outputOptions.Add(_("Insert as Text"));
	outputOptions.Add(_("Insert as Snippet"));
	outputOptions.Add(_("Show as HTML"));
	outputOptions.Add(_("Show as Tooltip"));
	outputOptions.Add(_("Create New Document"));
	m_outputBox = new wxRadioBox(this, wxID_ANY, _("Output"), wxDefaultPosition, wxDefaultSize, outputOptions, 1);
	m_outputBox->SetSelection(1);
	gridBagSizer->Add(m_outputBox, wxGBPosition(1,2), wxDefaultSpan, wxGROW);

	wxButton* cancelButton = new wxButton(this, wxID_CANCEL);
	wxButton* executeButton = new wxButton(this, wxID_OK, _("Execute"));
	executeButton->SetDefault();
	wxStdDialogButtonSizer* buttonSizer = new wxStdDialogButtonSizer;
	buttonSizer->AddButton(cancelButton);
	buttonSizer->AddButton(executeButton);
	buttonSizer->Realize();
	gridBagSizer->Add(buttonSizer, wxGBPosition(2,1), wxGBSpan(1,2), wxALIGN_BOTTOM);

	gridBagSizer->AddGrowableCol(2);
	gridBagSizer->AddGrowableRow(2);

	SetSizer(gridBagSizer);
	gridBagSizer->SetSizeHints(this);
	Centre();
}
void DatabaseRegistrationDialog::layoutControls()
{
    // create sizer for controls
    wxGridBagSizer* sizerControls = new wxGridBagSizer(styleguide().getRelatedControlMargin(wxVERTICAL),
        styleguide().getControlLabelMargin());

    sizerControls->Add(label_name, wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
    sizerControls->Add(text_ctrl_name, wxGBPosition(0, 1), wxGBSpan(1, 3), wxALIGN_CENTER_VERTICAL | wxEXPAND);

    sizerControls->Add(label_dbpath, wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
    wxBoxSizer* sizer_r1c1_3 = new wxBoxSizer(wxHORIZONTAL);
    sizer_r1c1_3->Add(text_ctrl_dbpath, 1, wxALIGN_CENTER_VERTICAL);
    sizer_r1c1_3->Add(button_browse, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, styleguide().getBrowseButtonMargin());
    sizerControls->Add(sizer_r1c1_3, wxGBPosition(1, 1), wxGBSpan(1, 3), wxEXPAND);

    sizerControls->Add(label_authentication, wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
    sizerControls->Add(choice_authentication, wxGBPosition(2, 1), wxGBSpan(1, 3), wxALIGN_CENTER_VERTICAL | wxEXPAND);

    int dx = styleguide().getUnrelatedControlMargin(wxHORIZONTAL) - styleguide().getControlLabelMargin();
    if (dx < 0)
        dx = 0;

    sizerControls->Add(label_username, wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
    sizerControls->Add(text_ctrl_username, wxGBPosition(3, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxEXPAND);
    sizerControls->Add(label_password, wxGBPosition(3, 2), wxDefaultSpan, wxLEFT | wxALIGN_CENTER_VERTICAL, dx);
    sizerControls->Add(text_ctrl_password, wxGBPosition(3, 3), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxEXPAND);

    sizerControls->Add(label_charset, wxGBPosition(4, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
    sizerControls->Add(combobox_charset, wxGBPosition(4, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxEXPAND);
    sizerControls->Add(label_role, wxGBPosition(4, 2), wxDefaultSpan, wxLEFT | wxALIGN_CENTER_VERTICAL, dx);
    sizerControls->Add(text_ctrl_role, wxGBPosition(4, 3), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxEXPAND);

    if (createM)
    {
        sizerControls->Add(label_pagesize, wxGBPosition(5, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
        sizerControls->Add(choice_pagesize, wxGBPosition(5, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxEXPAND);
        sizerControls->Add(label_dialect, wxGBPosition(5, 2), wxDefaultSpan, wxLEFT | wxALIGN_CENTER_VERTICAL, dx);
        sizerControls->Add(choice_dialect, wxGBPosition(5, 3), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxEXPAND);
    }

    sizerControls->AddGrowableCol(1);
    sizerControls->AddGrowableCol(3);

    // create sizer for buttons -> styleguide class will align it correctly
    wxSizer* sizerButtons = styleguide().createButtonSizer(button_ok, button_cancel);
    // use method in base class to set everything up
    layoutSizers(sizerControls, sizerButtons);
}
예제 #13
0
// adds a title section label to the dialog 
void CDlgItemProperties::addSection(const wxString& title) {
    wxStaticText* staticText = new wxStaticText( m_scrolledWindow, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, 0);
    staticText->Wrap( -1 );
    staticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );    
    m_gbSizer->Add( staticText, wxGBPosition( m_current_row, 0 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 3);
    m_current_row++;
}
예제 #14
0
wxGBSpan wxSizerXmlHandler::GetGBSpan(const wxString& param)
{
    wxSize sz = GetSize(param);
    if (sz.x < 1) sz.x = 1;
    if (sz.y < 1) sz.y = 1;
    return wxGBSpan(sz.x, sz.y);
}
예제 #15
0
		ResizePanel(wxPanel *parent, PicProcessor *proc, wxString params): PicProcPanel(parent, proc, params)
		{
			wxSizerFlags flags = wxSizerFlags().Left().Border(wxLEFT|wxRIGHT|wxTOP|wxBOTTOM).Expand();
			wxArrayString algos;
			algos.Add("box");
			algos.Add("bilinear");
			algos.Add("bspline");
			algos.Add("bicubic");
			algos.Add("catmullrom");
			algos.Add("lanczos3");
			wxArrayString p = split(params,",");
			g->Add(new wxStaticText(this,wxID_ANY, "width: "), wxGBPosition(0,0), wxDefaultSpan, wxALIGN_LEFT | wxALL, 3);
			widthedit = new wxSpinCtrl(this, wxID_ANY, p[0], wxDefaultPosition, wxSize(100,25),wxTE_PROCESS_ENTER | wxSP_ARROW_KEYS,0,10000);
			widthedit->SetToolTip("width in pixels, 0 preserves aspect.\nIf you use the spin arrows, type Enter to update the image.");
			g->Add(widthedit, wxGBPosition(0,1), wxDefaultSpan, wxALIGN_LEFT | wxALL, 3);
			g->Add(new wxStaticText(this,-1, "height: "), wxGBPosition(1,0), wxDefaultSpan, wxALIGN_LEFT | wxALL, 3);
			heightedit = new wxSpinCtrl(this, wxID_ANY, p[1], wxDefaultPosition, wxSize(100,25),wxTE_PROCESS_ENTER | wxSP_ARROW_KEYS,0,10000);
			heightedit->SetToolTip("height in pixels, 0 preserves aspect. \nIf you use the spin arrows, type Enter to update the image.");
			g->Add(heightedit, wxGBPosition(1,1), wxDefaultSpan, wxALIGN_LEFT | wxALL, 3);		
			algoselect = new wxRadioBox (this, wxID_ANY, "Resize Algorithm", wxDefaultPosition, wxDefaultSize,  algos, 1, wxRA_SPECIFY_COLS);
			if (p.size() >=3) {
				for (int i=0; i<algos.size(); i++) {
					if (p[2] == algos[i]) algoselect->SetSelection(i);
				}
			}
			g->Add(algoselect, wxGBPosition(2,0), wxGBSpan(1,2), wxALIGN_LEFT | wxALL, 3);	
			SetSizerAndFit(g);
			g->Layout();
			Refresh();
			Update();
			SetFocus();
			Bind(wxEVT_TEXT_ENTER,&ResizePanel::paramChanged, this);
			//Bind(wxEVT_SPINCTRL,&ResizePanel::paramChanged, this);
			Bind(wxEVT_RADIOBOX,&ResizePanel::paramChanged, this);	
		}
예제 #16
0
wxGBSpan wxSizerXmlHandler::GetGBSpan()
{
    wxSize sz = GetPairInts(wxS("cellspan"));
    if (sz.x < 1) sz.x = 1;
    if (sz.y < 1) sz.y = 1;
    return wxGBSpan(sz.x, sz.y);
}
예제 #17
0
wxStaticBoxSizer* InfoPanel::CreateISODetailsSizer()
{
  std::vector<std::pair<wxString, wxTextCtrl*&>> controls = {{
      {_("Internal Name:"), m_internal_name},
      {_("Game ID:"), m_game_id},
      {_("Country:"), m_country},
      {_("Maker ID:"), m_maker_id},
      {_("Revision:"), m_revision},
      {_("Apploader Date:"), m_date},
  }};
  if (m_opened_iso->GetTMD(m_opened_iso->GetGamePartition()).IsValid())
    controls.emplace_back(_("IOS Version:"), m_ios_version);

  const int space_10 = FromDIP(10);
  auto* const iso_details = new wxGridBagSizer(space_10, space_10);
  size_t row = 0;
  for (auto& control : controls)
  {
    auto* const text = new wxStaticText(this, wxID_ANY, control.first);
    iso_details->Add(text, wxGBPosition(row, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL);
    control.second = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                                    wxTE_READONLY);
    iso_details->Add(control.second, wxGBPosition(row, 1), wxGBSpan(1, 2), wxEXPAND);
    ++row;
  }

  auto* const md5_sum_text = new wxStaticText(this, wxID_ANY, _("MD5 Checksum:"));
  m_md5_sum = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                             wxTE_READONLY);
  m_md5_sum_compute = new wxButton(this, wxID_ANY, _("Compute"));

  iso_details->Add(md5_sum_text, wxGBPosition(row, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL);
  iso_details->Add(m_md5_sum, wxGBPosition(row, 1), wxGBSpan(1, 1), wxEXPAND);
  iso_details->Add(m_md5_sum_compute, wxGBPosition(row, 2), wxGBSpan(1, 1), wxEXPAND);
  ++row;

  iso_details->AddGrowableCol(1);

  const int space_5 = FromDIP(5);
  auto* const iso_details_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("ISO Details"));
  iso_details_sizer->AddSpacer(space_5);
  iso_details_sizer->Add(iso_details, 0, wxEXPAND | wxLEFT | wxRIGHT, space_5);
  iso_details_sizer->AddSpacer(space_5);

  return iso_details_sizer;
}
예제 #18
0
ProgressBase::ProgressBase( 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 );
	
	wxGridBagSizer* gbSizer4;
	gbSizer4 = new wxGridBagSizer( 0, 0 );
	gbSizer4->SetFlexibleDirection( wxBOTH );
	gbSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText9 = new wxStaticText( this, wxID_ANY, wxT("Progress"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText9->Wrap( -1 );
	gbSizer4->Add( m_staticText9, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
	
	m_gauge1 = new wxGauge( this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
	m_gauge1->SetValue( 0 ); 
	gbSizer4->Add( m_gauge1, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 );
	
	bSizer32 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("File"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	bSizer32->Add( m_staticText12, 0, wxALL, 5 );
	
	m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("%d"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	bSizer32->Add( m_staticText13, 0, wxTOP|wxBOTTOM, 5 );
	
	m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("of"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText14->Wrap( -1 );
	bSizer32->Add( m_staticText14, 0, wxALL, 5 );
	
	m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("%d"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText15->Wrap( -1 );
	bSizer32->Add( m_staticText15, 0, wxTOP|wxBOTTOM, 5 );
	
	
	gbSizer4->Add( bSizer32, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	
	gbSizer4->AddGrowableCol( 0 );
	
	this->SetSizer( gbSizer4 );
	this->Layout();
	
	this->Centre( wxBOTH );
}
예제 #19
0
void KeyCardPanel::Init()
{
	sizer_ = new wxGridBagSizer(8,8);
	this->SetSizer(sizer_);
	wxButton *btn;
	btn = new wxButton(this,BTN_KC_READKEYCARD,wxT("Х┴├▄н┐┐е"));
	sizer_->Add(btn,wxGBPosition(1,1),wxGBSpan(1,1));
	btn = new wxButton(this,BTN_KC_PUBLISHKEYCARD,wxT("иблл├▄н┐┐е"));
	sizer_->Add(btn,wxGBPosition(3,1),wxGBSpan(1,1));
	btn = new wxButton(this,BTN_KC_RECYCLEKEYCARD,wxT("╗п╩Н├▄н┐┐е"));
	sizer_->Add(btn,wxGBPosition(1,4),wxGBSpan(1,1));
	btn = new wxButton(this,BTN_KC_CLONEKEYCARD,wxT("┐╦┬А├▄н┐┐е"));
	sizer_->Add(btn,wxGBPosition(3,4),wxGBSpan(1,1));

	wxNotebook* notebook = (wxNotebook*)(this->GetParent());
	notebook->AddPage(this,wxT("├▄н┐┐е╣▄└ь"));
}
예제 #20
0
static void add_entry_line( 
    boost::shared_ptr<wxGridBagSizer*> sizer, 
    boost::shared_ptr<Window> label,
    boost::shared_ptr<Window> contents,
    boost::shared_ptr<Window> adornment,
    boost::shared_ptr<int> row
) {
    if ( *label )
        (*sizer)->Add( *label, wxGBPosition(*row,0), wxGBSpan(), wxALL | wxALIGN_CENTER_VERTICAL, Border );
    if ( *adornment ) {
        (*sizer)->Add( *contents, wxGBPosition(*row,1), wxGBSpan(), wxGROW | wxALL, Border );
        (*sizer)->Add( *adornment, wxGBPosition(*row,2), wxGBSpan(), wxALIGN_CENTER | wxALL, Border );
    } else {
        (*sizer)->Add( *contents, wxGBPosition(*row,1), wxGBSpan(1,2), wxGROW | wxALL, Border );
    }
    (*sizer)->Layout();
    ++ *row;
}
예제 #21
0
void FindReplaceDialog::ShowReplaceControls(bool show)
{
	//detach the find string & its label from the gridbag sizer
	bool isFindDlg(false);
	isFindDlg = gbSizer->GetItemPosition(sz) == wxGBPosition(1, 0);
	if (show == false) {
		//is this dialog is already a 'Find' dialog?
		if (isFindDlg) {
			return;
		}

		//remove 'Replace' dialog items
		gbSizer->Detach(m_replaceWithLabel);
		gbSizer->Detach(m_replaceString);

		//reposition the options static sizer
		gbSizer->Detach(sz);
		gbSizer->Add(sz, wxGBPosition(1, 0), wxGBSpan(1, 2),  wxALL | wxEXPAND, 5 );

	} else {
		// is this dialog is already a 'Replace' dialog?
		if (!isFindDlg) {
			return;
		}

		//remmove the 'Options' item frmo pos 1,0
		gbSizer->Detach(sz);
		gbSizer->Add(m_replaceWithLabel, wxGBPosition(1, 0), wxDefaultSpan, wxALL | wxEXPAND, 5 );
		gbSizer->Add(m_replaceString, wxGBPosition(1, 1), wxDefaultSpan, wxALL | wxEXPAND, 5 );
		gbSizer->Add(sz, wxGBPosition(2, 0), wxGBSpan(1, 2),  wxALL | wxEXPAND, 5 );
	}

	wxString label = show ? wxT("Replace") : wxT("Find");
	m_replace->Show(show);
	m_replaceAll->Show(show);
	m_replaceString->Show(show);
	m_replacementsMsg->Show(show);
	m_replaceWithLabel->Show(show);
	m_selectionOnly->Show(show);

	SetLabel(label);
	this->Fit();
	GetSizer()->Layout();
}
예제 #22
0
CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
	: wxDialog(parent, id, title, position, size, style)
	, selection(_selection)
{
	ActionReplay::ARCode tempEntries;
	wxString currentName = _("Insert name here..");

	if (selection == wxNOT_FOUND)
	{
		tempEntries.name = "";
	}
	else
	{
		currentName = StrToWxStr(arCodes.at(selection).name);
		tempEntries = arCodes.at(selection);
	}

	wxBoxSizer* sEditCheat = new wxBoxSizer(wxVERTICAL);
	wxStaticBoxSizer* sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, _("Cheat Code"));
	wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);

	wxStaticText* EditCheatNameText = new wxStaticText(this, ID_EDITCHEAT_NAME_TEXT, _("Name:"));
	EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString);
	EditCheatName->SetValue(currentName);
	EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT);
	EntrySelection->SetRange(1, ((int)arCodes.size()) > 0 ? (int)arCodes.size() : 1);
	EntrySelection->SetValue((int)(arCodes.size() - selection));
	EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE);
	UpdateTextCtrl(tempEntries);

	sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5);
	sgEntry->Add(EditCheatName,     wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
	sgEntry->Add(EntrySelection,    wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND|wxALL, 5);
	sgEntry->Add(EditCheatCode,     wxGBPosition(1, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
	sgEntry->AddGrowableCol(1);
	sgEntry->AddGrowableRow(1);
	sbEntry->Add(sgEntry, 1, wxEXPAND|wxALL);

	sEditCheat->Add(sbEntry, 1, wxEXPAND|wxALL, 5);
	sEditCheat->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxALL, 5);

	SetSizerAndFit(sEditCheat);
	SetFocus();
}
        AboutDialog::AboutDialog(wxWindow* parent) :
        wxDialog(parent, wxID_ANY, wxT("About")) {
            IO::FileManager fileManager;
            
            wxBitmap icon(fileManager.appendPath(fileManager.resourceDirectory(), "Icon.png"), wxBITMAP_TYPE_PNG);
            
            wxStaticBitmap* appIcon = new wxStaticBitmap(this, wxID_ANY, icon);
            wxStaticLine* appLine = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
            wxStaticText* appName = new wxStaticText(this, wxID_ANY, wxT("TrenchBroom"));
            appName->SetFont(appName->GetFont().Larger().Larger().Larger().Larger().Bold());
            
            wxStaticText* appClaim = new wxStaticText(this, wxID_ANY, wxT("A Modern Level Editor for Quake"));
            
            wxString versionStr(wxT("Version "));
            versionStr << VERSIONSTR;
            
            wxStaticText* version = new wxStaticText(this, wxID_ANY, versionStr);
            
            wxStaticText* devHeader = new wxStaticText(this, wxID_ANY, wxT("Development"));
            devHeader->SetFont(devHeader->GetFont().Bold());
            wxStaticText* devText = new wxStaticText(this, wxID_ANY, wxT("Kristian Duske"));
            
            wxStaticText* contrHeader = new wxStaticText(this, wxID_ANY, wxT("Contributions"));
            contrHeader->SetFont(contrHeader->GetFont().Bold());
            wxSizer* contrText = CreateTextSizer(wxT("Corey Jones (feedback, testing, documentation)\nAndré König (feedback, testing)\nWouter van Oortmerssen (feedback)\nHannes Kröger (testing)\nMorgan Allen (testing)\nForest Hale (fov code)\nChristian Grawert (Quake.fdg)"));
            
            wxSizer* copyright = CreateTextSizer(wxT("Copyright 2010-2013 Kristian Duske\nQuake is a registered trademark of id Software"));

            wxGridBagSizer* sizer = new wxGridBagSizer();

            int row = 0;
            sizer->Add(0, 10, wxGBPosition(row++, 1));
            sizer->AddGrowableRow(static_cast<size_t>(row - 1));
            sizer->Add(appName, wxGBPosition(row++, 1));
            sizer->Add(appLine, wxGBPosition(row++, 1), wxDefaultSpan, wxEXPAND);
            sizer->Add(appClaim, wxGBPosition(row++, 1));
            sizer->Add(0, 20, wxGBPosition(row++, 1));
            sizer->Add(version, wxGBPosition(row++, 1));
            sizer->Add(0, 20, wxGBPosition(row++, 1));
            sizer->Add(devHeader, wxGBPosition(row++, 1));
            sizer->Add(devText, wxGBPosition(row++, 1));
            sizer->Add(0, 20, wxGBPosition(row++, 1));
            sizer->Add(contrHeader, wxGBPosition(row++, 1));
            sizer->Add(contrText, wxGBPosition(row++, 1));
            sizer->Add(0, 20, wxGBPosition(row++, 1));
            sizer->Add(copyright, wxGBPosition(row++, 1));
            sizer->Add(0, 10, wxGBPosition(row++, 1));
            sizer->AddGrowableRow(static_cast<size_t>(row - 1));
            sizer->Add(appIcon, wxGBPosition(0, 0), wxGBSpan(row, 1), wxALIGN_CENTER);
            
            SetSizer(sizer);
            SetSize(650, 420);
            CenterOnParent();
            
            SetBackgroundColour(*wxWHITE);
        }
예제 #24
0
void wxDatabaseTableData::AppendField( wxDBControlBase* m_controlbase, int row, int col, int rowspan, int colspan, int flag )
{

    m_gbSizerFields->Add( m_controlbase, wxGBPosition( row, col ), wxGBSpan( rowspan, colspan ), flag, 5 );
    m_gbSizerFields->Layout();
    this->GetSizer()->Layout();
    this->SetSizerAndFit( this->GetSizer() );
    this->Layout();
    this->Refresh();
}
예제 #25
0
wxStaticBoxSizer* InfoPanel::CreateBannerDetailsSizer()
{
  auto* const name_text = new wxStaticText(this, wxID_ANY, _("Name:"));
  m_name = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                          wxTE_READONLY);
  auto* const maker_text = new wxStaticText(this, wxID_ANY, _("Maker:"));
  m_maker = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                           wxTE_READONLY);
  auto* const comment_text = new wxStaticText(this, wxID_ANY, _("Description:"));
  m_comment = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                             wxTE_MULTILINE | wxTE_READONLY);
  auto* const banner_text = new wxStaticText(this, wxID_ANY, _("Banner:"));
  m_banner =
      new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, FromDIP(wxSize(96, 32)));

  auto* const languages_text = new wxStaticText(this, wxID_ANY, _("Show Language:"));
  m_languages = CreateCommentLanguageChoice();

  const int space_10 = FromDIP(10);
  auto* const banner_details = new wxGridBagSizer(space_10, space_10);
  banner_details->Add(languages_text, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL);
  // Comboboxes cannot be safely stretched vertically on Windows.
  banner_details->Add(WxUtils::GiveMinSize(m_languages, wxDefaultSize), wxGBPosition(0, 1),
                      wxGBSpan(1, 1), wxEXPAND);
  banner_details->Add(name_text, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL);
  banner_details->Add(m_name, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND);
  banner_details->Add(maker_text, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL);
  banner_details->Add(m_maker, wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND);
  banner_details->Add(comment_text, wxGBPosition(3, 0), wxGBSpan(1, 1));
  banner_details->Add(m_comment, wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND);
  banner_details->Add(banner_text, wxGBPosition(4, 0), wxGBSpan(1, 1));
  banner_details->Add(m_banner, wxGBPosition(4, 1), wxGBSpan(1, 1));
  banner_details->AddGrowableCol(1);

  const int space_5 = FromDIP(5);
  auto* const banner_details_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Banner Details"));
  banner_details_sizer->AddSpacer(space_5);
  banner_details_sizer->Add(banner_details, 0, wxEXPAND | wxLEFT | wxRIGHT, space_5);
  banner_details_sizer->AddSpacer(space_5);

  return banner_details_sizer;
}
예제 #26
0
static void add_full_width_sizer(
    boost::shared_ptr<wxGridBagSizer*> sizer, 
    boost::shared_ptr<wxSizer*> child, 
    boost::shared_ptr<int> row,
    int proportion
) {
    (*sizer)->Add( *child, wxGBPosition(*row,0), wxGBSpan(1,3), wxGROW | wxEXPAND );
    if ( proportion ) (*sizer)->AddGrowableRow( *row );
    (*sizer)->Layout();
    ++ *row;
}
예제 #27
0
void PanelPreviewSound::createLayout(const Common::UString &title) {
	wxStaticBox *boxPreviewSound = new wxStaticBox(this, wxID_ANY, title);
	boxPreviewSound->Lower();

	wxStaticBoxSizer *sizerPreviewSound = new wxStaticBoxSizer(boxPreviewSound, wxVERTICAL);

	_textPosition = new wxGenericStaticText(this, wxID_ANY, wxEmptyString);
	_textPercent  = new wxGenericStaticText(this, wxID_ANY, wxEmptyString);
	_textDuration = new wxGenericStaticText(this, wxID_ANY, wxEmptyString);
	_textVolume   = new wxGenericStaticText(this, wxID_ANY, wxEmptyString);

	_sliderPosition = new wxSlider(this, wxID_ANY, 0, 0, 10000,
	                               wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL);

	_sliderVolume = new wxSlider(this, kEventSliderVolume, 100, 0, 100,
	                             wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);

	_buttonPlay  = new wxButton(this, kEventButtonPlay , wxT("Play"));
	_buttonPause = new wxButton(this, kEventButtonPause, wxT("Pause"));
	_buttonStop  = new wxButton(this, kEventButtonStop , wxT("Stop"));

	_textPosition->SetLabelMarkup(wxT("<tt>00:00:00.000</tt>"));
	_textPercent->SetLabelMarkup(wxT("<tt>???%</tt>"));
	_textDuration->SetLabelMarkup(wxT("<tt>??:??:??.???""</tt>"));
	_textVolume->SetLabelMarkup(wxT("<tt>100%</tt>"));

	_sliderPosition->Disable();

	wxGridBagSizer *sizerControls = new wxGridBagSizer();

	sizerControls->Add(_textPosition, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_LEFT   | wxBOTTOM, 5);
	sizerControls->Add(_textPercent , wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER | wxBOTTOM, 5);
	sizerControls->Add(_textDuration, wxGBPosition(0, 2), wxGBSpan(1, 1), wxALIGN_RIGHT  | wxBOTTOM, 5);
	sizerControls->Add(_buttonPlay  , wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_LEFT   | wxTOP   , 5);
	sizerControls->Add(_buttonPause , wxGBPosition(2, 1), wxGBSpan(1, 1), wxALIGN_CENTER | wxTOP   , 5);
	sizerControls->Add(_buttonStop  , wxGBPosition(2, 2), wxGBSpan(1, 1), wxALIGN_RIGHT  | wxTOP   , 5);

	sizerControls->Add(_sliderPosition, wxGBPosition(1, 0), wxGBSpan(1, 3), wxALIGN_CENTER | wxEXPAND, 0);

	sizerControls->Add(_sliderVolume, wxGBPosition(0, 3), wxGBSpan(3, 1), wxALIGN_CENTER | wxEXPAND | wxLEFT, 10);

	sizerControls->Add(_textVolume, wxGBPosition(0, 4), wxGBSpan(3, 1), wxALIGN_CENTER | wxEXPAND | wxLEFT, 5);

	sizerPreviewSound->Add(sizerControls, 0, 0, 0);
	SetSizer(sizerPreviewSound);
}
예제 #28
0
ExportInstWizard::ExportInstWizard(wxWindow *parent, Instance *inst)
	: wxWizard(parent, -1, _("Export Instance"))
{
	this->m_inst = inst;

	this->SetPageSize(wxSize(400, 300));

	wxFont titleFont(12, wxSWISS, wxNORMAL, wxNORMAL);

	enterInfoPage = new wxWizardPageSimple(this);
	wxGridBagSizer *infoPageSz = new wxGridBagSizer();
	enterInfoPage->SetSizer(infoPageSz);

	wxStaticText *infoTitleLabel = new wxStaticText(enterInfoPage, -1, _("Config Pack Info"), wxDefaultPosition, wxDefaultSize);
	infoTitleLabel->SetFont(titleFont);
	infoPageSz->Add(infoTitleLabel, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALIGN_CENTER | wxALL, 4);

	wxStaticText *nameLabel = new wxStaticText(enterInfoPage, -1, _("Name: "));
	infoPageSz->Add(nameLabel, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL | wxALIGN_CENTER_VERTICAL, 4);

	packNameTextbox = new wxTextCtrl(enterInfoPage, -1, inst->GetName());
	infoPageSz->Add(packNameTextbox, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 4);

	wxStaticText *notesLabel = new wxStaticText(enterInfoPage, -1, _("Notes: "));
	infoPageSz->Add(notesLabel, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL | wxALIGN_CENTER_VERTICAL, 4);

	packNotesTextbox = new wxTextCtrl(enterInfoPage, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
	infoPageSz->Add(packNotesTextbox, wxGBPosition(3, 0), wxGBSpan(1, 2), wxEXPAND | wxALL, 4);
	infoPageSz->AddGrowableCol(1);
	infoPageSz->AddGrowableRow(3);


	chooseConfigFilesPage = new wxWizardPageSimple(this, enterInfoPage);
	enterInfoPage->SetNext(chooseConfigFilesPage);
	wxGridBagSizer *configPageSz = new wxGridBagSizer();
	configPageSz->AddGrowableCol(0, 0);
	chooseConfigFilesPage->SetSizer(configPageSz);

	wxStaticText *configTitleLabel = new wxStaticText(chooseConfigFilesPage, -1, _("Choose Included Configs"), 
		wxDefaultPosition, wxDefaultSize);
	configTitleLabel->SetFont(titleFont);
	configPageSz->Add(configTitleLabel, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 4);

	wxArrayString configList;
	inst->GetPossibleConfigFiles(&configList);
	cfgListCtrl = new wxCheckListBox(chooseConfigFilesPage, -1,
		wxDefaultPosition, wxDefaultSize, configList);
	for (unsigned i = 0; i < cfgListCtrl->GetCount(); i++)
	{
		if (!cfgListCtrl->GetString(i).Contains("options.txt") &&
			!cfgListCtrl->GetString(i).Contains("optionsof.txt"))
				cfgListCtrl->Check(i, true);
	}
	configPageSz->Add(cfgListCtrl, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL | wxEXPAND, 4);
	configPageSz->AddGrowableRow(1, 0);
}
예제 #29
0
void thirdPagePanel::pageFilling()
{
    thirdPageDivider->Add(graphBlock,3, wxALL | wxEXPAND, 5);

    parent->SetStatusText(wxT("Figure 3.1 - LMFC of the given system"));
    thirdPageDivider->Add(hintFrameScrollWin,1, wxALL | wxEXPAND, 5);

    hintFrameSizer->Add(new wxStaticText(hintFrameScrollWin,-1,wxT("some text\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nyup,text")),wxGBPosition(0,0),wxGBSpan(1,1),wxGROW);
    hintFrameSizer->Add(thirdPageProceed,wxGBPosition(1,0),wxGBSpan(1,1),wxGROW);
    hintFrameSizer->AddGrowableCol(0);
    hintFrameSizer->AddGrowableRow(0);
    hintFrameSizer->Layout();
    return;
}
예제 #30
0
PrivateImportDailyFrame::PrivateImportDailyFrame() : wxDialog(NULL, wxID_ANY, wxT("Import daily quotes"),
											 wxDefaultPosition, wxDefaultSize)
{
	wxGridBagSizer *gbsizer=new wxGridBagSizer();

	wxStaticText* symbol_label = new wxStaticText(this, wxID_ANY, wxT("Symbol"));
	symbol_input = new wxComboBox(this, wxID_ANY);
	wxButton* file_selection = new wxButton(this, CHOOSE_DAILY_FILE_BUTTON_ID, wxT("Daily data..."));
	file_path_input = new wxTextCtrl(this, wxID_ANY);
	wxPanel* button_pane = new wxPanel(this, wxID_ANY);
	wxButton* ok_button = new wxButton(button_pane, wxID_OK, wxT("OK"));
	wxButton* cancel_button = new wxButton(button_pane, wxID_CANCEL, wxT("Cancel"));
	wxGridSizer* grid_sizer = new wxGridSizer(2, 1);
	grid_sizer->Add(ok_button);
	grid_sizer->Add(cancel_button);
	button_pane->SetSizer(grid_sizer);
	grid_sizer->SetSizeHints(button_pane);
	grid_sizer->Fit(button_pane);

	int row = 0;
	int col = 0;
	gbsizer->Add(symbol_label, wxGBPosition(row, col));
	col++;
	gbsizer->Add(symbol_input, wxGBPosition(row, col));
	row++;
	col=0;
	gbsizer->Add(file_selection, wxGBPosition(row, col));
	col++;
	gbsizer->Add(file_path_input, wxGBPosition(row, col), wxDefaultSpan, wxEXPAND|wxRIGHT);
	row++;
	col=0;
	gbsizer->Add(button_pane, wxGBPosition(row, col), wxGBSpan(1, 2), wxEXPAND|wxLEFT|wxRIGHT);
	gbsizer->AddGrowableCol(1);

	SetSizer(gbsizer);
	gbsizer->SetSizeHints(this);
	gbsizer->Fit(this);
	Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, 
		wxCloseEventHandler( PrivateImportDailyFrame::OnCloseWindow));
	Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PrivateImportDailyFrame::OnOK));
	Connect(CHOOSE_DAILY_FILE_BUTTON_ID, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PrivateImportDailyFrame::OnChooseFile));

	shared_SqliteSelectCallback result = SingleStockDB::Instance().Query("Select symbol from symbol_code");
	int count = result->GetRecordCount();
	for(int i=0; i<count; i++)
	{
		symbol_input->AppendString( wxString::FromAscii(result->GetFieldValue(i,0).c_str()));
	}
}