dialog_annotate_base.cpp 8.04 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "dialog_annotate_base.h"

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

DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( 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* bmainSizer;
	bmainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bupperSizer;
	bupperSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staticTextScope = new wxStaticText( this, wxID_ANY, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextScope->Wrap( -1 );
	m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bupperSizer->Add( m_staticTextScope, 0, wxALL, 6 );
	
	wxBoxSizer* bscopeOptSizer;
	bscopeOptSizer = new wxBoxSizer( wxVERTICAL );
	
	m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 3 );
	
	m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 );
	bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 3 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
	
	m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 3 );
	
	m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 );
	bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 3 );
	
	bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 );
	
	m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bupperSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
	
	m_staticTextOrder = new wxStaticText( this, wxID_ANY, _("Annotation Order"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextOrder->Wrap( -1 );
	m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bupperSizer->Add( m_staticTextOrder, 0, wxALL, 6 );
	
	wxBoxSizer* b_orderOptSizer;
	b_orderOptSizer = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizerXpos;
	bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort components by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 3 );
	
	
	bSizerXpos->Add( 0, 0, 1, wxEXPAND, 5 );
	
	annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 );
	
	b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND|wxRIGHT, 5 );
	
	wxBoxSizer* bSizerYpos;
	bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort components by &Y position"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 3 );
	
	
	bSizerYpos->Add( 0, 0, 1, wxEXPAND, 5 );
	
	annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
	
	b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND|wxRIGHT, 5 );
	
88
	bupperSizer->Add( b_orderOptSizer, 0, wxEXPAND|wxLEFT, 25 );
89
	
90 91
	m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
92
	
93 94
	wxBoxSizer* bSizerAnnotAlgo;
	bSizerAnnotAlgo = new wxBoxSizer( wxVERTICAL );
95
	
96 97 98
	m_staticTextAnnotateAlgo = new wxStaticText( this, wxID_ANY, _("Annotation Choice"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticTextAnnotateAlgo->Wrap( -1 );
	m_staticTextAnnotateAlgo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
99
	
100
	bSizerAnnotAlgo->Add( m_staticTextAnnotateAlgo, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
101
	
102 103
	wxBoxSizer* bSizer1AlgoChoice;
	bSizer1AlgoChoice = new wxBoxSizer( wxVERTICAL );
104
	
105 106
	wxBoxSizer* bSizerChoiceInc;
	bSizerChoiceInc = new wxBoxSizer( wxHORIZONTAL );
107
	
108 109
	m_rbUseIncremental = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Use first free number in schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizerChoiceInc->Add( m_rbUseIncremental, 0, wxALL, 3 );
110 111
	
	
112
	bSizerChoiceInc->Add( 0, 0, 1, wxEXPAND, 5 );
113
	
114
	bSizer1AlgoChoice->Add( bSizerChoiceInc, 0, wxEXPAND|wxRIGHT, 5 );
115
	
116 117
	wxBoxSizer* bSizerChoiceIncBySheet;
	bSizerChoiceIncBySheet = new wxBoxSizer( wxHORIZONTAL );
118
	
119 120
	m_rbUseSheetNum = new wxRadioButton( this, wxID_ANY, _("Start to  sheet number*100 and use first free number"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerChoiceIncBySheet->Add( m_rbUseSheetNum, 0, wxALL, 3 );
121
	
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
	
	bSizerChoiceIncBySheet->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer1AlgoChoice->Add( bSizerChoiceIncBySheet, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizerChoiceIncBySheetLarge;
	bSizerChoiceIncBySheetLarge = new wxBoxSizer( wxHORIZONTAL );
	
	m_rbStartSheetNumLarge = new wxRadioButton( this, wxID_ANY, _("Start to  sheet number*1000 and use first free number"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizerChoiceIncBySheetLarge->Add( m_rbStartSheetNumLarge, 0, wxALL, 3 );
	
	
	bSizerChoiceIncBySheetLarge->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer1AlgoChoice->Add( bSizerChoiceIncBySheetLarge, 1, wxEXPAND, 5 );
	
	bSizerAnnotAlgo->Add( bSizer1AlgoChoice, 1, wxEXPAND|wxLEFT, 25 );
	
	bupperSizer->Add( bSizerAnnotAlgo, 0, wxEXPAND|wxRIGHT, 5 );
	
	m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bupperSizer->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
	
	wxBoxSizer* bButtonsSizer;
	bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
	
	m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
	bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 );
	
	m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
	bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 );
	
	m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
	bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 );
	
	bupperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 6 );
	
	bmainSizer->Add( bupperSizer, 1, wxALL|wxEXPAND, 6 );
	
	this->SetSizer( bmainSizer );
	this->Layout();
	
	// Connect Events
	m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
	m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
	m_btnApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
}

DIALOG_ANNOTATE_BASE::~DIALOG_ANNOTATE_BASE()
{
	// Disconnect Events
	m_btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
	m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
	m_btnApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
	
}