dialog_fp_plugin_options_base.cpp 7.43 KB
Newer Older
1
///////////////////////////////////////////////////////////////////////////
2
// C++ code generated with wxFormBuilder (version Nov  6 2013)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "dialog_fp_plugin_options_base.h"

///////////////////////////////////////////////////////////////////////////

DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* m_horizontal_sizer;
	m_horizontal_sizer = new wxBoxSizer( wxHORIZONTAL );
	
22 23
	wxStaticBoxSizer* m_grid_sizer;
	m_grid_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Plugin Options:") ), wxVERTICAL );
24
	
25 26
	m_grid_sizer->SetMinSize( wxSize( -1,300 ) ); 
	m_grid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
27 28
	
	// Grid
29
	m_grid->CreateGrid( 1, 2 );
30 31 32 33
	m_grid->EnableEditing( true );
	m_grid->EnableGridLines( true );
	m_grid->EnableDragGridSize( false );
	m_grid->SetMargins( 0, 0 );
34 35
	
	// Columns
36 37 38 39 40 41
	m_grid->EnableDragColMove( false );
	m_grid->EnableDragColSize( true );
	m_grid->SetColLabelSize( 30 );
	m_grid->SetColLabelValue( 0, _("Option") );
	m_grid->SetColLabelValue( 1, _("Value") );
	m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
42 43
	
	// Rows
44
	m_grid->EnableDragRowSize( false );
45
	m_grid->SetRowLabelSize( 40 );
46
	m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
47 48 49 50
	
	// Label Appearance
	
	// Cell Defaults
51
	m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52
	m_grid_sizer->Add( m_grid, 1, wxEXPAND|wxTOP, 5 );
53
	
54 55
	wxBoxSizer* m_button_sizer;
	m_button_sizer = new wxBoxSizer( wxHORIZONTAL );
56
	
57 58
	m_add_row = new wxButton( this, wxID_ANY, _("Append"), wxDefaultPosition, wxDefaultSize, 0 );
	m_add_row->SetToolTip( _("Append a blank row") );
59
	
60 61 62 63 64 65
	m_button_sizer->Add( m_add_row, 0, wxALL, 5 );
	
	m_delete_row = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
	m_delete_row->SetToolTip( _("Delete the selected row") );
	
	m_button_sizer->Add( m_delete_row, 0, wxALL, 5 );
66 67
	
	m_move_up = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
68 69 70
	m_move_up->SetToolTip( _("Move the selected row up one position") );
	
	m_button_sizer->Add( m_move_up, 0, wxALL, 5 );
71 72
	
	m_move_down = new wxButton( this, wxID_ANY, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
73 74 75
	m_move_down->SetToolTip( _("Move the selected row down one position") );
	
	m_button_sizer->Add( m_move_down, 0, wxALL, 5 );
76 77
	
	
78
	m_grid_sizer->Add( m_button_sizer, 0, wxALIGN_CENTER, 5 );
79 80
	
	
81
	m_horizontal_sizer->Add( m_grid_sizer, 3, wxEXPAND, 5 );
82
	
83 84
	wxGridSizer* m_choose_size;
	m_choose_size = new wxGridSizer( 1, 1, 0, 0 );
85 86
	
	
87 88 89
	m_horizontal_sizer->Add( m_choose_size, 0, wxEXPAND, 5 );
	
	wxStaticBoxSizer* m_options_sizer;
90
	m_options_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Option Choices:") ), wxVERTICAL );
91 92
	
	m_options_sizer->SetMinSize( wxSize( 200,-1 ) ); 
93 94
	m_listbox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxLB_SINGLE ); 
	m_listbox->SetToolTip( _("Options supported by current plugin") );
95
	
96
	m_options_sizer->Add( m_listbox, 2, wxALL|wxEXPAND, 5 );
97
	
98 99
	m_append_choice_button = new wxButton( this, wxID_ANY, _("<< Append Selected Option"), wxDefaultPosition, wxDefaultSize, 0 );
	m_options_sizer->Add( m_append_choice_button, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
100
	
101 102 103
	m_staticText1 = new wxStaticText( this, wxID_ANY, _("Option Specific Help:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	m_options_sizer->Add( m_staticText1, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
104
	
105 106
	m_html = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxVSCROLL );
	m_html->SetMinSize( wxSize( 300,300 ) );
107
	
108
	m_options_sizer->Add( m_html, 3, wxALL|wxEXPAND, 5 );
109 110
	
	
111
	m_horizontal_sizer->Add( m_options_sizer, 2, wxEXPAND, 5 );
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
	
	
	bSizer4->Add( m_horizontal_sizer, 1, 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();
	
	bSizer4->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
	
	
	this->SetSizer( bSizer4 );
	this->Layout();
	bSizer4->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
133
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelCaptionButtonClick ) );
134 135 136 137
	m_add_row->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
	m_delete_row->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
	m_move_up->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveUp ), NULL, this );
	m_move_down->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveDown ), NULL, this );
138 139 140
	m_listbox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
	m_listbox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
	m_append_choice_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
141 142 143 144 145 146 147
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelButtonClick ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onOKButtonClick ), NULL, this );
}

DIALOG_FP_PLUGIN_OPTIONS_BASE::~DIALOG_FP_PLUGIN_OPTIONS_BASE()
{
	// Disconnect Events
148
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelCaptionButtonClick ) );
149 150 151 152
	m_add_row->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
	m_delete_row->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
	m_move_up->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveUp ), NULL, this );
	m_move_down->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onMoveDown ), NULL, this );
153 154 155
	m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
	m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
	m_append_choice_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
156 157 158 159
	m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onCancelButtonClick ), NULL, this );
	m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onOKButtonClick ), NULL, this );
	
}