More EESchema dialog file housekeeping and coding policy fixes.
This commit is contained in:
parent
f930894d9f
commit
f6c8066477
|
@ -4,6 +4,17 @@ KiCad ChangeLog 2010
|
|||
Please add newer entries at the top, list the date and your name with
|
||||
email address.
|
||||
|
||||
2010-nov-19 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
|
||||
================================================================================
|
||||
++EESchema
|
||||
* Move library new component and schematic edit sheet dialogs to dialogs
|
||||
folder.
|
||||
* Set library new component and schematic edit sheet dialogs default button.
|
||||
* Create wxFormBuilder version of edit sheet label dialog and remove hand
|
||||
coded version.
|
||||
* More coding policy fixes.
|
||||
|
||||
|
||||
2010-nov-19 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
|
||||
================================================================================
|
||||
++EESchema
|
||||
|
|
|
@ -59,12 +59,14 @@ set(EESCHEMA_SRCS
|
|||
dialogs/dialog_lib_edit_draw_item_base.cpp
|
||||
dialogs/dialog_lib_edit_pin.cpp
|
||||
dialogs/dialog_lib_edit_pin_base.cpp
|
||||
dialog_lib_new_component.cpp
|
||||
dialog_lib_new_component_base.cpp
|
||||
dialogs/dialog_lib_new_component.cpp
|
||||
dialogs/dialog_lib_new_component_base.cpp
|
||||
dialogs/dialog_print_using_printer_base.cpp
|
||||
dialogs/dialog_print_using_printer.cpp
|
||||
dialog_sch_sheet_props.cpp
|
||||
dialog_sch_sheet_props_base.cpp
|
||||
dialogs/dialog_sch_edit_sheet_pin.cpp
|
||||
dialogs/dialog_sch_edit_sheet_pin_base.cpp
|
||||
dialogs/dialog_sch_sheet_props.cpp
|
||||
dialogs/dialog_sch_sheet_props_base.cpp
|
||||
dialogs/dialog_schematic_find.cpp
|
||||
dialogs/dialog_schematic_find_base.cpp
|
||||
dialogs/dialog_SVG_print.cpp
|
||||
|
|
|
@ -418,7 +418,7 @@ void LIB_EDIT_FRAME::GeneralControle( wxDC* DC, wxPoint MousePositionInPixels )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::GeneralControle( wxDC* DC, wxPoint MousePositionInPixels )
|
||||
void LIB_VIEW_FRAME::GeneralControle( wxDC* DC, wxPoint MousePositionInPixels )
|
||||
{
|
||||
wxRealPoint delta;
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
|
|
@ -5,4 +5,5 @@ DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT( wxWindow* parent ) :
|
|||
{
|
||||
/* Required to make escape key work correctly in wxGTK. */
|
||||
m_sdbSizerOK->SetFocus();
|
||||
m_sdbSizerOK->SetDefault();
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#include "dialog_sch_edit_sheet_pin.h"
|
||||
|
||||
|
||||
static wxString sheetPinTypes[] =
|
||||
{
|
||||
_( "Input" ),
|
||||
_( "Output" ),
|
||||
_( "Bidirectional" ),
|
||||
_( "Tri-state" ),
|
||||
_( "Passive" )
|
||||
};
|
||||
|
||||
|
||||
#define SHEET_PIN_TYPE_CNT ( sizeof( sheetPinTypes ) / sizeof( wxString ) )
|
||||
|
||||
|
||||
DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent ) :
|
||||
DIALOG_SCH_EDIT_SHEET_PIN_BASE( parent )
|
||||
{
|
||||
for( size_t i = 0; i < SHEET_PIN_TYPE_CNT; i++ )
|
||||
m_choiceConnectionType->Append( sheetPinTypes[ i ] );
|
||||
|
||||
m_choiceConnectionType->SetSelection( 0 );
|
||||
m_textName->SetFocus();
|
||||
m_sdbSizer2OK->SetDefault();
|
||||
}
|
|
@ -0,0 +1,747 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="10" />
|
||||
<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_python_events">0</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_sch_edit_sheet_pin_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_sch_edit_sheet_pin</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<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_SCH_EDIT_SHEET_PIN_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title">Sheet Pin Properties</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></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="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">m_mainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_nameSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">3</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols"></property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fgSizer1</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">4</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Name:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</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">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</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="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_textName</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></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="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Text height:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</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">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</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="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_textHeight</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NUMERIC</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></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="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">units</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticHeightUnits</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</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">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Text width:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText5</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</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">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</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="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_textWidth</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></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="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">units</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticWidthUnits</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</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">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Connection type:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText3</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</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">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="choices"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</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">m_choiceConnectionType</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="selection">0</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnChoice"></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">6</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">0</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_sdbSizer2</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick"></event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick"></event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick"></event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef __dialog_sch_edit_sheet_pin__
|
||||
#define __dialog_sch_edit_sheet_pin__
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Subclass of DIALOG_SCH_EDIT_SHEET_PIN_BASE, which is generated by wxFormBuilder.
|
||||
*/
|
||||
|
||||
|
||||
#include "dialog_sch_edit_sheet_pin_base.h"
|
||||
|
||||
|
||||
class DIALOG_SCH_EDIT_SHEET_PIN : public DIALOG_SCH_EDIT_SHEET_PIN_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent );
|
||||
|
||||
void SetLabelName( const wxString& aName ) { m_textName->SetValue( aName ); }
|
||||
wxString GetLabelName() const { return m_textName->GetValue(); }
|
||||
|
||||
void SetTextHeight( const wxString& aHeight ) { m_textHeight->SetValue( aHeight ); }
|
||||
wxString GetTextHeight() const { return m_textHeight->GetValue(); }
|
||||
|
||||
void SetTextWidth( const wxString& aWidth ) { m_textWidth->SetValue( aWidth ); }
|
||||
wxString GetTextWidth() const { return m_textWidth->GetValue(); }
|
||||
|
||||
void SetConnectionType( int aType ) { m_choiceConnectionType->SetSelection( aType ); }
|
||||
int GetConnectionType() const { return m_choiceConnectionType->GetCurrentSelection(); }
|
||||
|
||||
void SetTextHeightUnits( const wxString& aUnit ) { m_staticHeightUnits->SetLabel( aUnit ); }
|
||||
void SetTextWidthUnits( const wxString& aUnit ) { m_staticWidthUnits->SetLabel( aUnit ); }
|
||||
};
|
||||
|
||||
#endif // __dialog_sch_edit_sheet_pin__
|
|
@ -0,0 +1,95 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_sch_edit_sheet_pin_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_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* m_mainSizer;
|
||||
m_mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* m_nameSizer;
|
||||
m_nameSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 4, 3, 0, 0 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 6 );
|
||||
|
||||
m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 6 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 6 );
|
||||
|
||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText2->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_textHeight = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textHeight, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_staticHeightUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticHeightUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticHeightUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText5->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_textWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textWidth, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticWidthUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText3->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
wxArrayString m_choiceConnectionTypeChoices;
|
||||
m_choiceConnectionType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceConnectionTypeChoices, 0 );
|
||||
m_choiceConnectionType->SetSelection( 0 );
|
||||
fgSizer1->Add( m_choiceConnectionType, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 6 );
|
||||
|
||||
m_nameSizer->Add( fgSizer1, 1, wxEXPAND, 6 );
|
||||
|
||||
m_mainSizer->Add( m_nameSizer, 1, wxALL|wxEXPAND, 6 );
|
||||
|
||||
|
||||
m_mainSizer->Add( 0, 0, 0, wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_sdbSizer2 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer2OK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer2->AddButton( m_sdbSizer2OK );
|
||||
m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer2->AddButton( m_sdbSizer2Cancel );
|
||||
m_sdbSizer2->Realize();
|
||||
m_mainSizer->Add( m_sdbSizer2, 0, wxALL|wxEXPAND, 6 );
|
||||
|
||||
this->SetSizer( m_mainSizer );
|
||||
this->Layout();
|
||||
m_mainSizer->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
DIALOG_SCH_EDIT_SHEET_PIN_BASE::~DIALOG_SCH_EDIT_SHEET_PIN_BASE()
|
||||
{
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_sch_edit_sheet_pin_base__
|
||||
#define __dialog_sch_edit_sheet_pin_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_SCH_EDIT_SHEET_PIN_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText1;
|
||||
wxTextCtrl* m_textName;
|
||||
|
||||
wxStaticText* m_staticText2;
|
||||
wxTextCtrl* m_textHeight;
|
||||
wxStaticText* m_staticHeightUnits;
|
||||
wxStaticText* m_staticText5;
|
||||
wxTextCtrl* m_textWidth;
|
||||
wxStaticText* m_staticWidthUnits;
|
||||
wxStaticText* m_staticText3;
|
||||
wxChoice* m_choiceConnectionType;
|
||||
|
||||
|
||||
wxStdDialogButtonSizer* m_sdbSizer2;
|
||||
wxButton* m_sdbSizer2OK;
|
||||
wxButton* m_sdbSizer2Cancel;
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sheet Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_SCH_EDIT_SHEET_PIN_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_sch_edit_sheet_pin_base__
|
|
@ -4,4 +4,5 @@ DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( wxWindow* parent ) :
|
|||
DIALOG_SCH_SHEET_PROPS_BASE( parent )
|
||||
{
|
||||
m_textFileName->SetFocus();
|
||||
m_sdbSizer1OK->SetDefault();
|
||||
}
|
|
@ -41,7 +41,7 @@ wxString WinEDA_SchematicFrame::SelectFromLibBrowser( void )
|
|||
m_ViewlibFrame = NULL;
|
||||
}
|
||||
|
||||
m_ViewlibFrame = new WinEDA_ViewlibFrame( this, NULL, &semaphore );
|
||||
m_ViewlibFrame = new LIB_VIEW_FRAME( this, NULL, &semaphore );
|
||||
m_ViewlibFrame->AdjustScrollBars();
|
||||
|
||||
// Show the library viewer frame until it is closed
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "class_library.h"
|
||||
#include "template_fieldnames.h"
|
||||
|
||||
#include "dialog_lib_new_component.h"
|
||||
#include "dialogs/dialog_lib_new_component.h"
|
||||
|
||||
|
||||
/* Update the main window title bar with the current library name. */
|
||||
|
|
|
@ -725,7 +725,7 @@ void WinEDA_SchematicFrame::OnOpenLibraryViewer( wxCommandEvent& event )
|
|||
}
|
||||
else
|
||||
{
|
||||
m_ViewlibFrame = new WinEDA_ViewlibFrame( this );
|
||||
m_ViewlibFrame = new LIB_VIEW_FRAME( this );
|
||||
m_ViewlibFrame->AdjustScrollBars();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "protos.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
#include "dialog_sch_sheet_props.h"
|
||||
#include "dialogs/dialog_sch_sheet_props.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
@ -110,7 +110,7 @@ structures and cannot be undone.\nOk to continue renaming?" );
|
|||
aSheet->ChangeFileName( this, fileName.GetFullPath() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
SaveCopyInUndoList( aSheet, UR_CHANGED );
|
||||
|
||||
|
@ -294,7 +294,7 @@ void WinEDA_SchematicFrame::StartMoveSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
DrawPanel->ForceCloseManageCurseur = ExitSheet;
|
||||
DrawPanel->ManageCurseur( DrawPanel, aDC, true );
|
||||
DrawPanel->CursorOn( aDC );
|
||||
|
||||
|
||||
if( (aSheet->m_Flags & IS_NEW) == 0 ) // not already in edit, save a copy for undo/redo
|
||||
{
|
||||
delete g_ItemToUndoCopy;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#include "sch_sheet.h"
|
||||
#include "dialog_helpers.h"
|
||||
|
||||
#include "dialogs/dialog_sch_edit_sheet_pin.h"
|
||||
|
||||
|
||||
static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC );
|
||||
static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
||||
|
@ -26,110 +28,6 @@ static wxSize NetSheetTextSize( DEFAULT_SIZE_TEXT, DEFAULT_SIZE_TEXT );
|
|||
static wxPoint s_InitialPosition; // remember the initial value of the pin label when moving it
|
||||
static int s_InitialEdge;
|
||||
|
||||
/****************************************/
|
||||
/* class WinEDA_PinSheetPropertiesFrame */
|
||||
/****************************************/
|
||||
|
||||
|
||||
class WinEDA_PinSheetPropertiesFrame : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
WinEDA_SchematicFrame* m_Parent;
|
||||
SCH_SHEET_PIN* m_CurrentPinSheet;
|
||||
wxRadioBox* m_PinSheetType;
|
||||
wxRadioBox* m_PinSheetShape;
|
||||
WinEDA_GraphicTextCtrl* m_TextWin;
|
||||
|
||||
public: WinEDA_PinSheetPropertiesFrame( WinEDA_SchematicFrame* parent,
|
||||
SCH_SHEET_PIN* curr_pinsheet,
|
||||
const wxPoint& framepos = wxPoint( -1, -1 ) );
|
||||
~WinEDA_PinSheetPropertiesFrame() { };
|
||||
|
||||
private:
|
||||
void OnOkClick( wxCommandEvent& event );
|
||||
void OnCancelClick( wxCommandEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE( WinEDA_PinSheetPropertiesFrame, wxDialog )
|
||||
EVT_BUTTON( wxID_OK, WinEDA_PinSheetPropertiesFrame::OnOkClick )
|
||||
EVT_BUTTON( wxID_CANCEL, WinEDA_PinSheetPropertiesFrame::OnCancelClick )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
WinEDA_PinSheetPropertiesFrame::WinEDA_PinSheetPropertiesFrame(
|
||||
WinEDA_SchematicFrame* parent,
|
||||
SCH_SHEET_PIN* curr_pinsheet,
|
||||
const wxPoint& framepos ) :
|
||||
wxDialog( parent, -1, _( "PinSheet Properties:" ), framepos,
|
||||
wxSize( 340, 220 ), DIALOG_STYLE )
|
||||
{
|
||||
wxPoint pos;
|
||||
wxString number;
|
||||
wxButton* Button;
|
||||
|
||||
m_Parent = parent;
|
||||
|
||||
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
SetSizer( MainBoxSizer );
|
||||
wxBoxSizer* LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer* RightBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||
MainBoxSizer->Add( LeftBoxSizer, 0, wxGROW | wxALL, 5 );
|
||||
MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
|
||||
|
||||
m_CurrentPinSheet = curr_pinsheet;
|
||||
|
||||
/* Create buttons: */
|
||||
Button = new wxButton( this, wxID_OK, _( "OK" ) );
|
||||
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
|
||||
|
||||
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
|
||||
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
|
||||
|
||||
m_TextWin = new WinEDA_GraphicTextCtrl( this, _( "Text:" ),
|
||||
m_CurrentPinSheet->m_Text,
|
||||
m_CurrentPinSheet->m_Size.x,
|
||||
g_UserUnit, LeftBoxSizer, 200 );
|
||||
|
||||
// Display shape selection :
|
||||
#define NBSHAPES 5
|
||||
wxString shape_list[NBSHAPES] =
|
||||
{
|
||||
_( "Input" ), _( "Output" ), _( "Bidi" ), _( "TriState" ),
|
||||
_( "Passive" )
|
||||
};
|
||||
m_PinSheetShape = new wxRadioBox( this, -1, _( "PinSheet Shape:" ),
|
||||
wxDefaultPosition, wxSize( -1, -1 ),
|
||||
NBSHAPES, shape_list, 1 );
|
||||
m_PinSheetShape->SetSelection( m_CurrentPinSheet->m_Shape );
|
||||
LeftBoxSizer->Add( m_PinSheetShape, 0, wxGROW | wxALL, 5 );
|
||||
|
||||
m_TextWin->SetFocus();
|
||||
|
||||
GetSizer()->Fit( this );
|
||||
GetSizer()->SetSizeHints( this );
|
||||
Centre();
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_PinSheetPropertiesFrame::OnCancelClick( wxCommandEvent& WXUNUSED(
|
||||
event) )
|
||||
{
|
||||
EndModal( wxID_CANCEL );
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_PinSheetPropertiesFrame::OnOkClick( wxCommandEvent& event )
|
||||
{
|
||||
m_CurrentPinSheet->m_Text = m_TextWin->GetText();
|
||||
m_CurrentPinSheet->m_Size.x = m_CurrentPinSheet->m_Size.y = m_TextWin->GetTextSize();
|
||||
|
||||
m_CurrentPinSheet->m_Shape = m_PinSheetShape->GetSelection();
|
||||
EndModal( wxID_OK );
|
||||
}
|
||||
|
||||
|
||||
/* Called when aborting a move pinsheet label
|
||||
* delete a new pin sheet label, or restire its old position
|
||||
|
@ -195,8 +93,7 @@ void SCH_SHEET_PIN::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_SchematicFrame::StartMove_PinSheet( SCH_SHEET_PIN* SheetLabel,
|
||||
wxDC* DC )
|
||||
void WinEDA_SchematicFrame::StartMove_PinSheet( SCH_SHEET_PIN* SheetLabel, wxDC* DC )
|
||||
{
|
||||
NetSheetTextSize = SheetLabel->m_Size;
|
||||
s_CurrentTypeLabel = SheetLabel->m_Shape;
|
||||
|
@ -226,24 +123,44 @@ static void Move_PinSheet( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
|
|||
}
|
||||
|
||||
|
||||
int WinEDA_SchematicFrame::Edit_PinSheet( SCH_SHEET_PIN* SheetLabel, wxDC* DC )
|
||||
int WinEDA_SchematicFrame::Edit_PinSheet( SCH_SHEET_PIN* aLabel, wxDC* aDC )
|
||||
{
|
||||
if( SheetLabel == NULL )
|
||||
if( aLabel == NULL )
|
||||
return wxID_CANCEL;
|
||||
|
||||
if( DC )
|
||||
RedrawOneStruct( DrawPanel, DC, SheetLabel, g_XorMode );
|
||||
if( aDC )
|
||||
RedrawOneStruct( DrawPanel, aDC, aLabel, g_XorMode );
|
||||
|
||||
WinEDA_PinSheetPropertiesFrame* frame =
|
||||
new WinEDA_PinSheetPropertiesFrame( this, SheetLabel );
|
||||
DIALOG_SCH_EDIT_SHEET_PIN dlg( this );
|
||||
|
||||
int diag = frame->ShowModal();
|
||||
frame->Destroy();
|
||||
dlg.SetLabelName( aLabel->m_Text );
|
||||
dlg.SetTextHeight( ReturnStringFromValue( g_UserUnit, aLabel->m_Size.y, m_InternalUnits ) );
|
||||
dlg.SetTextHeightUnits( GetUnitsLabel( g_UserUnit ) );
|
||||
dlg.SetTextWidth( ReturnStringFromValue( g_UserUnit, aLabel->m_Size.x, m_InternalUnits ) );
|
||||
dlg.SetTextWidthUnits( GetUnitsLabel( g_UserUnit ) );
|
||||
dlg.SetConnectionType( aLabel->m_Shape );
|
||||
|
||||
if( DC )
|
||||
RedrawOneStruct( DrawPanel, DC, SheetLabel, GR_DEFAULT_DRAWMODE );
|
||||
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier versions for
|
||||
* the flex grid sizer in wxGTK that prevents the last column from being sized
|
||||
* correctly. It doesn't cause any problems on win32 so it doesn't need to wrapped
|
||||
* in ugly #ifdef __WXGTK__ #endif.
|
||||
*/
|
||||
dlg.Layout();
|
||||
dlg.Fit();
|
||||
dlg.SetMinSize( dlg.GetSize() );
|
||||
|
||||
return diag;
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return wxID_CANCEL;
|
||||
|
||||
aLabel->m_Text = dlg.GetLabelName();
|
||||
aLabel->m_Size.y = ReturnValueFromString( g_UserUnit, dlg.GetTextHeight(), m_InternalUnits );
|
||||
aLabel->m_Size.x = ReturnValueFromString( g_UserUnit, dlg.GetTextWidth(), m_InternalUnits );
|
||||
aLabel->m_Shape = dlg.GetConnectionType();
|
||||
|
||||
if( aDC )
|
||||
RedrawOneStruct( DrawPanel, aDC, aLabel, GR_DEFAULT_DRAWMODE );
|
||||
|
||||
return wxID_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -266,6 +183,7 @@ SCH_SHEET_PIN* WinEDA_SchematicFrame::Create_PinSheet( SCH_SHEET* Sheet, wxDC* D
|
|||
delete NewSheetLabel;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GetScreen()->SetCurItem( NewSheetLabel );
|
||||
s_CurrentTypeLabel = NewSheetLabel->m_Shape;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "dialog_helpers.h"
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::ReCreateHToolbar()
|
||||
void LIB_VIEW_FRAME::ReCreateHToolbar()
|
||||
{
|
||||
int ii;
|
||||
wxString msg;
|
||||
|
@ -159,6 +159,6 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::ReCreateVToolbar()
|
||||
void LIB_VIEW_FRAME::ReCreateVToolbar()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -22,43 +22,44 @@
|
|||
/**
|
||||
* Save previous component library viewer state.
|
||||
*/
|
||||
wxString WinEDA_ViewlibFrame::m_libraryName;
|
||||
wxString WinEDA_ViewlibFrame::m_entryName;
|
||||
wxString WinEDA_ViewlibFrame::m_exportToEeschemaCmpName; // When the viewer is used to select a component
|
||||
// in schematic, the selected component is here
|
||||
int WinEDA_ViewlibFrame::m_unit = 1;
|
||||
int WinEDA_ViewlibFrame::m_convert = 1;
|
||||
wxSize WinEDA_ViewlibFrame::m_clientSize = wxSize( -1, -1 );
|
||||
wxString LIB_VIEW_FRAME::m_libraryName;
|
||||
wxString LIB_VIEW_FRAME::m_entryName;
|
||||
int LIB_VIEW_FRAME::m_unit = 1;
|
||||
int LIB_VIEW_FRAME::m_convert = 1;
|
||||
wxSize LIB_VIEW_FRAME::m_clientSize = wxSize( -1, -1 );
|
||||
|
||||
// When the viewer is used to select a component in schematic, the selected component is here.
|
||||
wxString LIB_VIEW_FRAME::m_exportToEeschemaCmpName;
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* class WinEDA_ViewlibFrame */
|
||||
/*****************************/
|
||||
BEGIN_EVENT_TABLE( WinEDA_ViewlibFrame, WinEDA_DrawFrame )
|
||||
BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, WinEDA_DrawFrame )
|
||||
/* Window events */
|
||||
EVT_CLOSE( WinEDA_ViewlibFrame::OnCloseWindow )
|
||||
EVT_SIZE( WinEDA_ViewlibFrame::OnSize )
|
||||
EVT_ACTIVATE( WinEDA_ViewlibFrame::OnActivate )
|
||||
EVT_CLOSE( LIB_VIEW_FRAME::OnCloseWindow )
|
||||
EVT_SIZE( LIB_VIEW_FRAME::OnSize )
|
||||
EVT_ACTIVATE( LIB_VIEW_FRAME::OnActivate )
|
||||
|
||||
/* Sash drag events */
|
||||
EVT_SASH_DRAGGED( ID_LIBVIEW_LIBWINDOW, WinEDA_ViewlibFrame::OnSashDrag )
|
||||
EVT_SASH_DRAGGED( ID_LIBVIEW_CMPWINDOW, WinEDA_ViewlibFrame::OnSashDrag )
|
||||
EVT_SASH_DRAGGED( ID_LIBVIEW_LIBWINDOW, LIB_VIEW_FRAME::OnSashDrag )
|
||||
EVT_SASH_DRAGGED( ID_LIBVIEW_CMPWINDOW, LIB_VIEW_FRAME::OnSashDrag )
|
||||
|
||||
/* Toolbar events */
|
||||
EVT_TOOL_RANGE( ID_LIBVIEW_NEXT, ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
|
||||
WinEDA_ViewlibFrame::Process_Special_Functions )
|
||||
LIB_VIEW_FRAME::Process_Special_Functions )
|
||||
|
||||
EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA_ViewlibFrame::OnZoom )
|
||||
EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, LIB_VIEW_FRAME::OnZoom )
|
||||
EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC,
|
||||
WinEDA_ViewlibFrame::ExportToSchematicLibraryPart )
|
||||
LIB_VIEW_FRAME::ExportToSchematicLibraryPart )
|
||||
EVT_KICAD_CHOICEBOX( ID_LIBVIEW_SELECT_PART_NUMBER,
|
||||
WinEDA_ViewlibFrame::Process_Special_Functions )
|
||||
LIB_VIEW_FRAME::Process_Special_Functions )
|
||||
|
||||
/* listbox events */
|
||||
EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, WinEDA_ViewlibFrame::ClickOnLibList )
|
||||
EVT_LISTBOX( ID_LIBVIEW_CMP_LIST, WinEDA_ViewlibFrame::ClickOnCmpList )
|
||||
EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList )
|
||||
EVT_LISTBOX( ID_LIBVIEW_CMP_LIST, LIB_VIEW_FRAME::ClickOnCmpList )
|
||||
|
||||
EVT_MENU( ID_SET_RELATIVE_OFFSET, WinEDA_ViewlibFrame::OnSetRelativeOffset )
|
||||
EVT_MENU( ID_SET_RELATIVE_OFFSET, LIB_VIEW_FRAME::OnSetRelativeOffset )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
@ -82,9 +83,7 @@ static wxAcceleratorEntry accels[] =
|
|||
#define EXTRA_BORDER_SIZE 2
|
||||
|
||||
|
||||
WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
|
||||
CMP_LIBRARY* Library,
|
||||
wxSemaphore* semaphore ) :
|
||||
LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaphore* semaphore ) :
|
||||
WinEDA_DrawFrame( father, VIEWER_FRAME, _( "Library browser" ),
|
||||
wxDefaultPosition, wxDefaultSize )
|
||||
{
|
||||
|
@ -204,17 +203,17 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
|
|||
m_auimgr.AddPane( m_HToolBar,
|
||||
wxAuiPaneInfo( horiz ).Name( wxT ("m_HToolBar" ) ).Top().Row( 0 ) );
|
||||
|
||||
wxSize minsize(60,-1);
|
||||
wxSize minsize( 60, -1 );
|
||||
|
||||
// Manage the left window (list of libraries)
|
||||
if( m_LibListWindow )
|
||||
m_auimgr.AddPane( m_LibListWindow,
|
||||
wxAuiPaneInfo( vert ).Name( wxT( "m_LibList" ) ).
|
||||
Left().Row( 0 ).MinSize(minsize) );
|
||||
m_auimgr.AddPane( m_LibListWindow, wxAuiPaneInfo( vert ).Name( wxT( "m_LibList" ) ).
|
||||
Left().Row( 0 ).MinSize( minsize ) );
|
||||
|
||||
// Manage the list of components)
|
||||
m_auimgr.AddPane( m_CmpListWindow,
|
||||
wxAuiPaneInfo( vert ).Name( wxT( "m_CmpList" ) ).
|
||||
Left().Row( 1 ).MinSize(minsize) );
|
||||
Left().Row( 1 ).MinSize( minsize ) );
|
||||
|
||||
// Manage the draw panel
|
||||
m_auimgr.AddPane( DrawPanel,
|
||||
|
@ -239,19 +238,20 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
|
|||
}
|
||||
|
||||
|
||||
WinEDA_ViewlibFrame::~WinEDA_ViewlibFrame()
|
||||
LIB_VIEW_FRAME::~LIB_VIEW_FRAME()
|
||||
{
|
||||
WinEDA_SchematicFrame* frame =
|
||||
(WinEDA_SchematicFrame*) wxGetApp().GetTopWindow();
|
||||
WinEDA_SchematicFrame* frame = (WinEDA_SchematicFrame*) wxGetApp().GetTopWindow();
|
||||
frame->m_ViewlibFrame = NULL;
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::OnCloseWindow( wxCloseEvent& Event )
|
||||
void LIB_VIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
||||
{
|
||||
SaveSettings();
|
||||
|
||||
if( m_Semaphore )
|
||||
m_Semaphore->Post();
|
||||
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void WinEDA_ViewlibFrame::OnCloseWindow( wxCloseEvent& Event )
|
|||
/*
|
||||
* Resize sub windows when dragging a sash window border
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::OnSashDrag( wxSashEvent& event )
|
||||
void LIB_VIEW_FRAME::OnSashDrag( wxSashEvent& event )
|
||||
{
|
||||
if( event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE )
|
||||
return;
|
||||
|
@ -272,26 +272,26 @@ void WinEDA_ViewlibFrame::OnSashDrag( wxSashEvent& event )
|
|||
case ID_LIBVIEW_LIBWINDOW:
|
||||
if( m_LibListWindow )
|
||||
{
|
||||
wxAuiPaneInfo& pane = m_auimgr.GetPane(m_LibListWindow);
|
||||
wxAuiPaneInfo& pane = m_auimgr.GetPane( m_LibListWindow );
|
||||
m_LibListSize.x = event.GetDragRect().width;
|
||||
pane.MinSize(m_LibListSize);
|
||||
pane.MinSize( m_LibListSize );
|
||||
m_auimgr.Update();
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_LIBVIEW_CMPWINDOW:
|
||||
{
|
||||
wxAuiPaneInfo& pane = m_auimgr.GetPane(m_CmpListWindow);
|
||||
m_CmpListSize.x = event.GetDragRect().width;
|
||||
pane.MinSize(m_CmpListSize);
|
||||
m_auimgr.Update();
|
||||
wxAuiPaneInfo& pane = m_auimgr.GetPane( m_CmpListWindow );
|
||||
m_CmpListSize.x = event.GetDragRect().width;
|
||||
pane.MinSize( m_CmpListSize );
|
||||
m_auimgr.Update();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv )
|
||||
void LIB_VIEW_FRAME::OnSize( wxSizeEvent& SizeEv )
|
||||
{
|
||||
if( m_auimgr.GetManagedWindow() )
|
||||
m_auimgr.Update();
|
||||
|
@ -300,14 +300,14 @@ void WinEDA_ViewlibFrame::OnSize( wxSizeEvent& SizeEv )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::OnSetRelativeOffset( wxCommandEvent& event )
|
||||
void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event )
|
||||
{
|
||||
GetScreen()->m_O_Curseur = GetScreen()->m_Curseur;
|
||||
UpdateStatusBar();
|
||||
}
|
||||
|
||||
|
||||
int WinEDA_ViewlibFrame::BestZoom()
|
||||
int LIB_VIEW_FRAME::BestZoom()
|
||||
{
|
||||
int bestzoom, ii, jj;
|
||||
wxSize size;
|
||||
|
@ -372,7 +372,7 @@ int WinEDA_ViewlibFrame::BestZoom()
|
|||
* Creates or recreates the list of current loaded libraries.
|
||||
* This list is sorted, with the library cache always at end of the list
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::ReCreateListLib()
|
||||
void LIB_VIEW_FRAME::ReCreateListLib()
|
||||
{
|
||||
if( m_LibList == NULL )
|
||||
return;
|
||||
|
@ -404,7 +404,7 @@ void WinEDA_ViewlibFrame::ReCreateListLib()
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::ReCreateListCmp()
|
||||
void LIB_VIEW_FRAME::ReCreateListCmp()
|
||||
{
|
||||
if( m_CmpList == NULL )
|
||||
return;
|
||||
|
@ -441,7 +441,7 @@ void WinEDA_ViewlibFrame::ReCreateListCmp()
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::ClickOnLibList( wxCommandEvent& event )
|
||||
void LIB_VIEW_FRAME::ClickOnLibList( wxCommandEvent& event )
|
||||
{
|
||||
int ii = m_LibList->GetSelection();
|
||||
|
||||
|
@ -449,8 +449,10 @@ void WinEDA_ViewlibFrame::ClickOnLibList( wxCommandEvent& event )
|
|||
return;
|
||||
|
||||
wxString name = m_LibList->GetString( ii );
|
||||
|
||||
if( m_libraryName == name )
|
||||
return;
|
||||
|
||||
m_libraryName = name;
|
||||
ReCreateListCmp();
|
||||
DrawPanel->Refresh();
|
||||
|
@ -459,7 +461,7 @@ void WinEDA_ViewlibFrame::ClickOnLibList( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::ClickOnCmpList( wxCommandEvent& event )
|
||||
void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event )
|
||||
{
|
||||
int ii = m_CmpList->GetSelection();
|
||||
|
||||
|
@ -485,7 +487,7 @@ void WinEDA_ViewlibFrame::ClickOnCmpList( wxCommandEvent& event )
|
|||
/*
|
||||
* Export the current component to schematic and close the library browser
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::ExportToSchematicLibraryPart( wxCommandEvent& event )
|
||||
void LIB_VIEW_FRAME::ExportToSchematicLibraryPart( wxCommandEvent& event )
|
||||
{
|
||||
int ii = m_CmpList->GetSelection();
|
||||
|
||||
|
@ -493,19 +495,22 @@ void WinEDA_ViewlibFrame::ExportToSchematicLibraryPart( wxCommandEvent& event )
|
|||
m_exportToEeschemaCmpName = m_CmpList->GetString( ii );
|
||||
else
|
||||
m_exportToEeschemaCmpName.Empty();
|
||||
|
||||
Close( TRUE );
|
||||
}
|
||||
|
||||
|
||||
#define LIBLIST_WIDTH_KEY wxT("Liblist_width")
|
||||
#define CMPLIST_WIDTH_KEY wxT("Cmplist_width")
|
||||
#define LIBLIST_WIDTH_KEY wxT( "Liblist_width" )
|
||||
#define CMPLIST_WIDTH_KEY wxT( "Cmplist_width" )
|
||||
|
||||
|
||||
/**
|
||||
* Load library viewer frame specific configuration settings.
|
||||
*
|
||||
* Don't forget to call this base method from any derived classes or the
|
||||
* settings will not get loaded.
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::LoadSettings( )
|
||||
void LIB_VIEW_FRAME::LoadSettings( )
|
||||
{
|
||||
wxConfig* cfg ;
|
||||
|
||||
|
@ -535,7 +540,7 @@ void WinEDA_ViewlibFrame::LoadSettings( )
|
|||
* Don't forget to call this base method from any derived classes or the
|
||||
* settings will not get saved.
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::SaveSettings()
|
||||
void LIB_VIEW_FRAME::SaveSettings()
|
||||
{
|
||||
wxConfig* cfg;
|
||||
|
||||
|
@ -546,13 +551,14 @@ void WinEDA_ViewlibFrame::SaveSettings()
|
|||
|
||||
if ( m_LibListSize.x )
|
||||
cfg->Write( LIBLIST_WIDTH_KEY, m_LibListSize.x );
|
||||
|
||||
cfg->Write( CMPLIST_WIDTH_KEY, m_CmpListSize.x );
|
||||
}
|
||||
|
||||
/** Called on activate the frame.
|
||||
* Reload the libraries lists that can be changed by the schematic editor or the library editor
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::OnActivate( wxActivateEvent& event )
|
||||
void LIB_VIEW_FRAME::OnActivate( wxActivateEvent& event )
|
||||
{
|
||||
WinEDA_DrawFrame::OnActivate( event );
|
||||
|
||||
|
@ -562,5 +568,6 @@ void WinEDA_ViewlibFrame::OnActivate( wxActivateEvent& event )
|
|||
|
||||
if( m_LibList )
|
||||
ReCreateListLib();
|
||||
|
||||
DisplayLibInfos();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class CMP_LIBRARY;
|
|||
/**
|
||||
* Component library viewer main window.
|
||||
*/
|
||||
class WinEDA_ViewlibFrame : public WinEDA_DrawFrame
|
||||
class LIB_VIEW_FRAME : public WinEDA_DrawFrame
|
||||
{
|
||||
private:
|
||||
WinEDAChoiceBox* SelpartBox;
|
||||
|
@ -47,11 +47,9 @@ protected:
|
|||
static wxSize m_clientSize;
|
||||
|
||||
public:
|
||||
WinEDA_ViewlibFrame( wxWindow* father,
|
||||
CMP_LIBRARY* Library = NULL,
|
||||
wxSemaphore* semaphore = NULL );
|
||||
LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library = NULL, wxSemaphore* semaphore = NULL );
|
||||
|
||||
~WinEDA_ViewlibFrame();
|
||||
~LIB_VIEW_FRAME();
|
||||
|
||||
void OnSize( wxSizeEvent& event );
|
||||
void OnSashDrag( wxSashEvent& event );
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define PREVIOUS_PART -1
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||
void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||
{
|
||||
wxString msg;
|
||||
LIB_ALIAS* LibEntry;
|
||||
|
@ -80,27 +80,26 @@ void WinEDA_ViewlibFrame::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
msg << wxT( "WinEDA_ViewlibFrame::Process_Special_Functions error: id = " ) << id;
|
||||
msg << wxT( "LIB_VIEW_FRAME::Process_Special_Functions error: id = " ) << id;
|
||||
DisplayError( this, msg );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_ViewlibFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
||||
void LIB_VIEW_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool WinEDA_ViewlibFrame::OnRightClick( const wxPoint& MousePos,
|
||||
wxMenu* PopMenu )
|
||||
bool LIB_VIEW_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Displays the name of the current opened library in the caption */
|
||||
void WinEDA_ViewlibFrame::DisplayLibInfos()
|
||||
void LIB_VIEW_FRAME::DisplayLibInfos()
|
||||
{
|
||||
wxString msg;
|
||||
CMP_LIBRARY* Lib;
|
||||
|
@ -123,16 +122,18 @@ void WinEDA_ViewlibFrame::DisplayLibInfos()
|
|||
/*****************************************/
|
||||
/* Function to Select Current library */
|
||||
/*****************************************/
|
||||
void WinEDA_ViewlibFrame::SelectCurrentLibrary()
|
||||
void LIB_VIEW_FRAME::SelectCurrentLibrary()
|
||||
{
|
||||
CMP_LIBRARY* Lib;
|
||||
|
||||
Lib = SelectLibraryFromList( this );
|
||||
|
||||
if( Lib )
|
||||
{
|
||||
m_entryName.Empty();
|
||||
m_libraryName = Lib->GetName();
|
||||
DisplayLibInfos();
|
||||
|
||||
if( m_LibList )
|
||||
{
|
||||
ReCreateListCmp();
|
||||
|
@ -140,6 +141,7 @@ void WinEDA_ViewlibFrame::SelectCurrentLibrary()
|
|||
DisplayLibInfos();
|
||||
ReCreateHToolbar();
|
||||
int id = m_LibList->FindString( m_libraryName.GetData() );
|
||||
|
||||
if( id >= 0 )
|
||||
m_LibList->SetSelection( id );
|
||||
}
|
||||
|
@ -150,7 +152,7 @@ void WinEDA_ViewlibFrame::SelectCurrentLibrary()
|
|||
/*
|
||||
* Routine to select and view library Part (NEW, NEXT or PREVIOUS)
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::SelectAndViewLibraryPart( int option )
|
||||
void LIB_VIEW_FRAME::SelectAndViewLibraryPart( int option )
|
||||
{
|
||||
CMP_LIBRARY* Lib;
|
||||
|
||||
|
@ -160,6 +162,7 @@ void WinEDA_ViewlibFrame::SelectAndViewLibraryPart( int option )
|
|||
return;
|
||||
|
||||
Lib = CMP_LIBRARY::FindLibrary( m_libraryName );
|
||||
|
||||
if( Lib == NULL )
|
||||
return;
|
||||
|
||||
|
@ -185,7 +188,7 @@ void WinEDA_ViewlibFrame::SelectAndViewLibraryPart( int option )
|
|||
/*************************************************/
|
||||
/* Routine to view one selected library content. */
|
||||
/*************************************************/
|
||||
void WinEDA_ViewlibFrame::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag )
|
||||
void LIB_VIEW_FRAME::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag )
|
||||
{
|
||||
int NumOfParts = 0;
|
||||
LIB_ALIAS* LibEntry;
|
||||
|
@ -248,7 +251,7 @@ void WinEDA_ViewlibFrame::ViewOneLibraryContent( CMP_LIBRARY* Lib, int Flag )
|
|||
* Display the current selected component.
|
||||
* If the component is an alias, the ROOT component is displayed
|
||||
*/
|
||||
void WinEDA_ViewlibFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
||||
void LIB_VIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
||||
{
|
||||
LIB_COMPONENT* component;
|
||||
LIB_ALIAS* entry;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
class LIB_EDIT_FRAME;
|
||||
class WinEDA_ViewlibFrame;
|
||||
class LIB_VIEW_FRAME;
|
||||
class SCH_SCREEN;
|
||||
class DRAWSEGMENT;
|
||||
class DrawPickedStruct;
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
bool m_ShowAllPins;
|
||||
wxPoint m_OldPos;
|
||||
LIB_EDIT_FRAME* m_LibeditFrame;
|
||||
WinEDA_ViewlibFrame* m_ViewlibFrame;
|
||||
LIB_VIEW_FRAME* m_ViewlibFrame;
|
||||
wxString m_UserLibraryPath;
|
||||
wxArrayString m_ComponentLibFiles;
|
||||
|
||||
|
|
Loading…
Reference in New Issue