Refactor eeschema dialog_color_config.xx, using wxFormBuilder to create the base dialog
This commit is contained in:
parent
d583b1ff98
commit
0c17d22332
|
@ -20,12 +20,13 @@ include_directories(
|
||||||
|
|
||||||
|
|
||||||
set( EESCHEMA_DLGS
|
set( EESCHEMA_DLGS
|
||||||
dialogs/dialog_color_config.cpp
|
|
||||||
dialogs/dialog_annotate.cpp
|
dialogs/dialog_annotate.cpp
|
||||||
dialogs/dialog_annotate_base.cpp
|
dialogs/dialog_annotate_base.cpp
|
||||||
dialogs/dialog_bom.cpp
|
dialogs/dialog_bom.cpp
|
||||||
dialogs/dialog_bom_base.cpp
|
dialogs/dialog_bom_base.cpp
|
||||||
dialogs/dialog_bom_cfg_keywords.cpp
|
dialogs/dialog_bom_cfg_keywords.cpp
|
||||||
|
dialogs/dialog_color_config.cpp
|
||||||
|
dialogs/dialog_color_config_base.cpp
|
||||||
dialogs/dialog_choose_component.cpp
|
dialogs/dialog_choose_component.cpp
|
||||||
dialogs/dialog_choose_component_base.cpp
|
dialogs/dialog_choose_component_base.cpp
|
||||||
dialogs/dialog_lib_edit_text.cpp
|
dialogs/dialog_lib_edit_text.cpp
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
|
* Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -111,59 +111,31 @@ static EDA_COLOR_T currentColors[ LAYERSCH_ID_COUNT ];
|
||||||
|
|
||||||
|
|
||||||
DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent ) :
|
DIALOG_COLOR_CONFIG::DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent ) :
|
||||||
DIALOG_SHIM( aParent, wxID_ANY, _( "EESchema Colors" ),
|
DIALOG_COLOR_CONFIG_BASE( aParent )
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
|
|
||||||
{
|
{
|
||||||
m_parent = aParent;
|
m_parent = aParent;
|
||||||
SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
|
|
||||||
Init();
|
|
||||||
CreateControls();
|
CreateControls();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_COLOR_CONFIG::~DIALOG_COLOR_CONFIG()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_COLOR_CONFIG::Init()
|
|
||||||
{
|
|
||||||
m_outerBoxSizer = NULL;
|
|
||||||
m_mainBoxSizer = NULL;
|
|
||||||
m_columnBoxSizer = NULL;
|
|
||||||
m_rowBoxSizer = NULL;
|
|
||||||
m_bitmapButton = NULL;
|
|
||||||
m_SelBgColor = NULL;
|
|
||||||
m_line = NULL;
|
|
||||||
m_stdDialogButtonSizer = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_COLOR_CONFIG::CreateControls()
|
void DIALOG_COLOR_CONFIG::CreateControls()
|
||||||
{
|
{
|
||||||
wxButton* button;
|
|
||||||
wxStaticText* label;
|
wxStaticText* label;
|
||||||
int buttonId = 1800;
|
int buttonId = 1800;
|
||||||
|
|
||||||
BUTTONINDEX* groups = buttonGroups;
|
BUTTONINDEX* groups = buttonGroups;
|
||||||
|
wxBoxSizer* columnBoxSizer = NULL;
|
||||||
m_outerBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
SetSizer( m_outerBoxSizer );
|
|
||||||
|
|
||||||
m_mainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
m_outerBoxSizer->Add( m_mainBoxSizer, 1, wxGROW | wxLEFT | wxRIGHT, 5 );
|
|
||||||
|
|
||||||
while( groups->m_Buttons != NULL )
|
while( groups->m_Buttons != NULL )
|
||||||
{
|
{
|
||||||
COLORBUTTON* buttons = groups->m_Buttons;
|
COLORBUTTON* buttons = groups->m_Buttons;
|
||||||
|
|
||||||
m_columnBoxSizer = new wxBoxSizer( wxVERTICAL );
|
columnBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
m_mainBoxSizer->Add( m_columnBoxSizer, 1, wxALIGN_TOP | wxLEFT | wxTOP, 5 );
|
m_mainBoxSizer->Add( columnBoxSizer, 1, wxALIGN_TOP | wxLEFT | wxTOP, 5 );
|
||||||
m_rowBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
wxBoxSizer* rowBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
m_columnBoxSizer->Add( m_rowBoxSizer, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
columnBoxSizer->Add( rowBoxSizer, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
||||||
|
|
||||||
// Add a text string to identify the column of color select buttons.
|
// Add a text string to identify the column of color select buttons.
|
||||||
label = new wxStaticText( this, wxID_ANY, groups->m_Name );
|
label = new wxStaticText( this, wxID_ANY, groups->m_Name );
|
||||||
|
@ -173,12 +145,12 @@ void DIALOG_COLOR_CONFIG::CreateControls()
|
||||||
font.SetWeight( wxFONTWEIGHT_BOLD );
|
font.SetWeight( wxFONTWEIGHT_BOLD );
|
||||||
label->SetFont( font );
|
label->SetFont( font );
|
||||||
|
|
||||||
m_rowBoxSizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
|
rowBoxSizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
|
||||||
|
|
||||||
while( buttons->m_Layer >= 0 )
|
while( buttons->m_Layer >= 0 )
|
||||||
{
|
{
|
||||||
m_rowBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
rowBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
m_columnBoxSizer->Add( m_rowBoxSizer, 0, wxGROW | wxALL, 0 );
|
columnBoxSizer->Add( rowBoxSizer, 0, wxGROW | wxALL, 0 );
|
||||||
|
|
||||||
wxMemoryDC iconDC;
|
wxMemoryDC iconDC;
|
||||||
wxBitmap bitmap( BUTT_SIZE_X, BUTT_SIZE_Y );
|
wxBitmap bitmap( BUTT_SIZE_X, BUTT_SIZE_Y );
|
||||||
|
@ -192,24 +164,19 @@ void DIALOG_COLOR_CONFIG::CreateControls()
|
||||||
|
|
||||||
wxBrush brush;
|
wxBrush brush;
|
||||||
ColorSetBrush( &brush, color );
|
ColorSetBrush( &brush, color );
|
||||||
|
|
||||||
#if wxCHECK_VERSION( 3, 0, 0 )
|
|
||||||
brush.SetStyle( wxBRUSHSTYLE_SOLID );
|
brush.SetStyle( wxBRUSHSTYLE_SOLID );
|
||||||
#else
|
|
||||||
brush.SetStyle( wxSOLID );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
iconDC.SetBrush( brush );
|
iconDC.SetBrush( brush );
|
||||||
iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );
|
iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );
|
||||||
|
|
||||||
m_bitmapButton = new wxBitmapButton( this, buttonId, bitmap, wxDefaultPosition,
|
wxBitmapButton* bitmapButton = new wxBitmapButton(
|
||||||
|
this, buttonId, bitmap, wxDefaultPosition,
|
||||||
wxSize( BUTT_SIZE_X+8, BUTT_SIZE_Y+6 ) );
|
wxSize( BUTT_SIZE_X+8, BUTT_SIZE_Y+6 ) );
|
||||||
m_bitmapButton->SetClientData( (void*) buttons );
|
bitmapButton->SetClientData( (void*) buttons );
|
||||||
|
|
||||||
m_rowBoxSizer->Add( m_bitmapButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, 5 );
|
rowBoxSizer->Add( bitmapButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, 5 );
|
||||||
|
|
||||||
label = new wxStaticText( this, wxID_ANY, wxGetTranslation( buttons->m_Name ) );
|
label = new wxStaticText( this, wxID_ANY, wxGetTranslation( buttons->m_Name ) );
|
||||||
m_rowBoxSizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, 5 );
|
rowBoxSizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, 5 );
|
||||||
buttonId += 1;
|
buttonId += 1;
|
||||||
buttons++;
|
buttons++;
|
||||||
}
|
}
|
||||||
|
@ -220,53 +187,24 @@ void DIALOG_COLOR_CONFIG::CreateControls()
|
||||||
Connect( 1800, buttonId - 1, wxEVT_COMMAND_BUTTON_CLICKED,
|
Connect( 1800, buttonId - 1, wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler( DIALOG_COLOR_CONFIG::SetColor ) );
|
wxCommandEventHandler( DIALOG_COLOR_CONFIG::SetColor ) );
|
||||||
|
|
||||||
// Add a spacer to improve appearance.
|
wxArrayString selBgColorStrings;
|
||||||
m_columnBoxSizer->AddSpacer( 5 );
|
selBgColorStrings.Add( _( "White" ) );
|
||||||
|
selBgColorStrings.Add( _( "Black" ) );
|
||||||
wxArrayString m_SelBgColorStrings;
|
|
||||||
m_SelBgColorStrings.Add( _( "White" ) );
|
|
||||||
m_SelBgColorStrings.Add( _( "Black" ) );
|
|
||||||
m_SelBgColor = new wxRadioBox( this, wxID_ANY, _( "Background Color" ),
|
m_SelBgColor = new wxRadioBox( this, wxID_ANY, _( "Background Color" ),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
m_SelBgColorStrings, 1, wxRA_SPECIFY_COLS );
|
selBgColorStrings, 1, wxRA_SPECIFY_COLS );
|
||||||
m_SelBgColor->SetSelection( ( m_parent->GetDrawBgColor() == BLACK ) ? 1 : 0 );
|
m_SelBgColor->SetSelection( ( m_parent->GetDrawBgColor() == BLACK ) ? 1 : 0 );
|
||||||
m_columnBoxSizer->Add( m_SelBgColor, 1, wxGROW | wxRIGHT | wxTOP | wxBOTTOM, 5 );
|
|
||||||
|
if( columnBoxSizer )
|
||||||
|
{
|
||||||
|
// Add a spacer to improve appearance.
|
||||||
|
columnBoxSizer->AddSpacer( 5 );
|
||||||
|
columnBoxSizer->Add( m_SelBgColor, 1, wxGROW | wxRIGHT | wxTOP | wxBOTTOM, 5 );
|
||||||
|
}
|
||||||
|
|
||||||
currentColors[ LAYER_BACKGROUND ] = m_parent->GetDrawBgColor();
|
currentColors[ LAYER_BACKGROUND ] = m_parent->GetDrawBgColor();
|
||||||
|
|
||||||
|
// button->SetFocus();
|
||||||
// Provide a line to separate all of the controls added so far from the
|
|
||||||
// "OK", "Cancel", and "Apply" buttons (which will be added after that
|
|
||||||
// line).
|
|
||||||
m_line = new wxStaticLine( this, -1, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
||||||
m_outerBoxSizer->Add( m_line, 0, wxGROW | wxALL, 5 );
|
|
||||||
|
|
||||||
// Provide a StdDialogButtonSizer to accommodate the OK, Cancel, and Apply
|
|
||||||
// buttons; using that type of sizer results in those buttons being
|
|
||||||
// automatically located in positions appropriate for each (OS) version of
|
|
||||||
// KiCad.
|
|
||||||
m_stdDialogButtonSizer = new wxStdDialogButtonSizer;
|
|
||||||
m_outerBoxSizer->Add( m_stdDialogButtonSizer, 0, wxGROW | wxALL, 10 );
|
|
||||||
|
|
||||||
button = new wxButton( this, wxID_OK, _( "OK" ), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_stdDialogButtonSizer->AddButton( button );
|
|
||||||
|
|
||||||
button = new wxButton( this, wxID_CANCEL, _( "Cancel" ), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_stdDialogButtonSizer->AddButton( button );
|
|
||||||
|
|
||||||
button->SetFocus();
|
|
||||||
|
|
||||||
button = new wxButton( this, wxID_APPLY, _( "Apply" ), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_stdDialogButtonSizer->AddButton( button );
|
|
||||||
|
|
||||||
Connect( wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_COLOR_CONFIG::OnOkClick ) );
|
|
||||||
Connect( wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_COLOR_CONFIG::OnCancelClick ) );
|
|
||||||
Connect( wxID_APPLY, wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_COLOR_CONFIG::OnApplyClick ) );
|
|
||||||
|
|
||||||
m_stdDialogButtonSizer->Realize();
|
|
||||||
|
|
||||||
// Dialog now needs to be resized, but the associated command is found elsewhere.
|
// Dialog now needs to be resized, but the associated command is found elsewhere.
|
||||||
}
|
}
|
||||||
|
@ -299,11 +237,7 @@ void DIALOG_COLOR_CONFIG::SetColor( wxCommandEvent& event )
|
||||||
|
|
||||||
ColorSetBrush( &brush, color);
|
ColorSetBrush( &brush, color);
|
||||||
|
|
||||||
#if wxCHECK_VERSION( 3, 0, 0 )
|
|
||||||
brush.SetStyle( wxBRUSHSTYLE_SOLID );
|
brush.SetStyle( wxBRUSHSTYLE_SOLID );
|
||||||
#else
|
|
||||||
brush.SetStyle( wxSOLID );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
iconDC.SetBrush( brush );
|
iconDC.SetBrush( brush );
|
||||||
iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );
|
iconDC.DrawRectangle( 0, 0, BUTT_SIZE_X, BUTT_SIZE_Y );
|
||||||
|
@ -356,14 +290,10 @@ void DIALOG_COLOR_CONFIG::OnOkClick( wxCommandEvent& event )
|
||||||
|
|
||||||
m_parent->GetCanvas()->Refresh();
|
m_parent->GetCanvas()->Refresh();
|
||||||
|
|
||||||
EndModal( 1 );
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_COLOR_CONFIG::OnCancelClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
EndModal( -1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_COLOR_CONFIG::OnApplyClick( wxCommandEvent& event )
|
void DIALOG_COLOR_CONFIG::OnApplyClick( wxCommandEvent& event )
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 G. Harland
|
* Copyright (C) 2007 G. Harland
|
||||||
* Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
|
* Copyright (C) 1992-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -25,8 +25,7 @@
|
||||||
#ifndef DIALOG_COLOR_CONFIG_H_
|
#ifndef DIALOG_COLOR_CONFIG_H_
|
||||||
#define DIALOG_COLOR_CONFIG_H_
|
#define DIALOG_COLOR_CONFIG_H_
|
||||||
|
|
||||||
#include <wx/statline.h>
|
#include <dialog_color_config_base.h>
|
||||||
#include <dialog_shim.h>
|
|
||||||
|
|
||||||
|
|
||||||
class wxBoxSizer;
|
class wxBoxSizer;
|
||||||
|
@ -38,40 +37,23 @@ class wxStdDialogButtonSizer;
|
||||||
/* Derived class for the frame color settings. */
|
/* Derived class for the frame color settings. */
|
||||||
/***********************************************/
|
/***********************************************/
|
||||||
|
|
||||||
class DIALOG_COLOR_CONFIG : public DIALOG_SHIM
|
class DIALOG_COLOR_CONFIG : public DIALOG_COLOR_CONFIG_BASE
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
EDA_DRAW_FRAME* m_parent;
|
EDA_DRAW_FRAME* m_parent;
|
||||||
wxBoxSizer* m_outerBoxSizer;
|
|
||||||
wxBoxSizer* m_mainBoxSizer;
|
|
||||||
wxBoxSizer* m_columnBoxSizer;
|
|
||||||
wxBoxSizer* m_rowBoxSizer;
|
|
||||||
wxBitmapButton* m_bitmapButton;
|
|
||||||
wxRadioBox* m_SelBgColor;
|
wxRadioBox* m_SelBgColor;
|
||||||
wxStaticLine* m_line;
|
|
||||||
wxStdDialogButtonSizer* m_stdDialogButtonSizer;
|
|
||||||
|
|
||||||
// Initializes member variables
|
|
||||||
void Init();
|
|
||||||
|
|
||||||
// Creates the controls and sizers
|
// Creates the controls and sizers
|
||||||
void CreateControls();
|
void CreateControls();
|
||||||
|
|
||||||
wxBitmap GetBitmapResource( const wxString& aName );
|
|
||||||
wxIcon GetIconResource( const wxString& aName );
|
|
||||||
static bool ShowToolTips();
|
|
||||||
|
|
||||||
bool UpdateColorsSettings();
|
bool UpdateColorsSettings();
|
||||||
void SetColor( wxCommandEvent& aEvent );
|
void SetColor( wxCommandEvent& aEvent );
|
||||||
void OnOkClick( wxCommandEvent& aEvent );
|
void OnOkClick( wxCommandEvent& aEvent );
|
||||||
void OnCancelClick( wxCommandEvent& aEvent );
|
|
||||||
void OnApplyClick( wxCommandEvent& aEvent );
|
void OnApplyClick( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructors and destructor
|
// Constructors and destructor
|
||||||
DIALOG_COLOR_CONFIG();
|
|
||||||
DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent );
|
DIALOG_COLOR_CONFIG( EDA_DRAW_FRAME* aParent );
|
||||||
~DIALOG_COLOR_CONFIG();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOG_COLOR_CONFIG_H_
|
#endif // DIALOG_COLOR_CONFIG_H_
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "dialog_color_config_base.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
DIALOG_COLOR_CONFIG_BASE::DIALOG_COLOR_CONFIG_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* bmainSizer;
|
||||||
|
bmainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_mainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
|
||||||
|
bmainSizer->Add( m_mainBoxSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
bmainSizer->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||||
|
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||||
|
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||||
|
m_sdbSizerApply = new wxButton( this, wxID_APPLY );
|
||||||
|
m_sdbSizer->AddButton( m_sdbSizerApply );
|
||||||
|
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||||
|
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||||
|
m_sdbSizer->Realize();
|
||||||
|
|
||||||
|
bmainSizer->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
this->SetSizer( bmainSizer );
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_COLOR_CONFIG_BASE::OnApplyClick ), NULL, this );
|
||||||
|
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_COLOR_CONFIG_BASE::OnOkClick ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_COLOR_CONFIG_BASE::~DIALOG_COLOR_CONFIG_BASE()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_COLOR_CONFIG_BASE::OnApplyClick ), NULL, this );
|
||||||
|
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_COLOR_CONFIG_BASE::OnOkClick ), NULL, this );
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,217 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<wxFormBuilder_Project>
|
||||||
|
<FileVersion major="1" minor="13" />
|
||||||
|
<object class="Project" expanded="1">
|
||||||
|
<property name="class_decoration"></property>
|
||||||
|
<property name="code_generation">C++</property>
|
||||||
|
<property name="disconnect_events">1</property>
|
||||||
|
<property name="disconnect_mode">source_name</property>
|
||||||
|
<property name="disconnect_php_events">0</property>
|
||||||
|
<property name="disconnect_python_events">0</property>
|
||||||
|
<property name="embedded_files_path">res</property>
|
||||||
|
<property name="encoding">UTF-8</property>
|
||||||
|
<property name="event_generation">connect</property>
|
||||||
|
<property name="file">dialog_color_config_base</property>
|
||||||
|
<property name="first_id">1000</property>
|
||||||
|
<property name="help_provider">none</property>
|
||||||
|
<property name="internationalize">1</property>
|
||||||
|
<property name="name">dialog_color_config_base</property>
|
||||||
|
<property name="namespace"></property>
|
||||||
|
<property name="path">.</property>
|
||||||
|
<property name="precompiled_header"></property>
|
||||||
|
<property name="relative_path">1</property>
|
||||||
|
<property name="skip_lua_events">1</property>
|
||||||
|
<property name="skip_php_events">1</property>
|
||||||
|
<property name="skip_python_events">1</property>
|
||||||
|
<property name="ui_table">UI</property>
|
||||||
|
<property name="use_enum">0</property>
|
||||||
|
<property name="use_microsoft_bom">0</property>
|
||||||
|
<object class="Dialog" expanded="1">
|
||||||
|
<property name="aui_managed">0</property>
|
||||||
|
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="center">wxBOTH</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="event_handler">impl_virtual</property>
|
||||||
|
<property name="extra_style"></property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">DIALOG_COLOR_CONFIG_BASE</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="size">446,344</property>
|
||||||
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
|
<property name="title">EESchema Colors</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnActivate"></event>
|
||||||
|
<event name="OnActivateApp"></event>
|
||||||
|
<event name="OnAuiFindManager"></event>
|
||||||
|
<event name="OnAuiPaneButton"></event>
|
||||||
|
<event name="OnAuiPaneClose"></event>
|
||||||
|
<event name="OnAuiPaneMaximize"></event>
|
||||||
|
<event name="OnAuiPaneRestore"></event>
|
||||||
|
<event name="OnAuiRender"></event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnClose"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnHibernate"></event>
|
||||||
|
<event name="OnIconize"></event>
|
||||||
|
<event name="OnIdle"></event>
|
||||||
|
<event name="OnInitDialog"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bmainSizer</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">m_mainBoxSizer</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND | wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticLine" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_staticline</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style">wxLI_HORIZONTAL</property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALIGN_RIGHT|wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||||
|
<property name="Apply">1</property>
|
||||||
|
<property name="Cancel">1</property>
|
||||||
|
<property name="ContextHelp">0</property>
|
||||||
|
<property name="Help">0</property>
|
||||||
|
<property name="No">0</property>
|
||||||
|
<property name="OK">1</property>
|
||||||
|
<property name="Save">0</property>
|
||||||
|
<property name="Yes">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">m_sdbSizer</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<event name="OnApplyButtonClick">OnApplyClick</event>
|
||||||
|
<event name="OnCancelButtonClick"></event>
|
||||||
|
<event name="OnContextHelpButtonClick"></event>
|
||||||
|
<event name="OnHelpButtonClick"></event>
|
||||||
|
<event name="OnNoButtonClick"></event>
|
||||||
|
<event name="OnOKButtonClick">OnOkClick</event>
|
||||||
|
<event name="OnSaveButtonClick"></event>
|
||||||
|
<event name="OnYesButtonClick"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</wxFormBuilder_Project>
|
|
@ -0,0 +1,57 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __DIALOG_COLOR_CONFIG_BASE_H__
|
||||||
|
#define __DIALOG_COLOR_CONFIG_BASE_H__
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
|
#include <wx/intl.h>
|
||||||
|
class DIALOG_SHIM;
|
||||||
|
|
||||||
|
#include "dialog_shim.h"
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/gdicmn.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
|
#include <wx/font.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class DIALOG_COLOR_CONFIG_BASE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class DIALOG_COLOR_CONFIG_BASE : public DIALOG_SHIM
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxBoxSizer* m_mainBoxSizer;
|
||||||
|
wxStaticLine* m_staticline;
|
||||||
|
wxStdDialogButtonSizer* m_sdbSizer;
|
||||||
|
wxButton* m_sdbSizerOK;
|
||||||
|
wxButton* m_sdbSizerApply;
|
||||||
|
wxButton* m_sdbSizerCancel;
|
||||||
|
|
||||||
|
// Virtual event handlers, overide them in your derived class
|
||||||
|
virtual void OnApplyClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
DIALOG_COLOR_CONFIG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Colors"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 446,344 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
~DIALOG_COLOR_CONFIG_BASE();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__DIALOG_COLOR_CONFIG_BASE_H__
|
Loading…
Reference in New Issue