Dialog naming conventions.
This commit is contained in:
parent
bafa105ed0
commit
6eb59b9d9e
|
@ -58,9 +58,7 @@ set( EESCHEMA_DLGS
|
|||
dialogs/dialog_lib_symbol_properties_base.cpp
|
||||
dialogs/dialog_edit_symbols_libid.cpp
|
||||
dialogs/dialog_edit_symbols_libid_base.cpp
|
||||
dialogs/dialog_edit_label.cpp
|
||||
dialogs/dialog_edit_label_base.cpp
|
||||
dialogs/dialog_edit_one_field.cpp
|
||||
dialogs/dialog_field_properties.cpp
|
||||
dialogs/dialog_eeschema_page_settings.cpp
|
||||
dialogs/dialog_erc.cpp
|
||||
dialogs/dialog_erc_base.cpp
|
||||
|
@ -69,14 +67,14 @@ set( EESCHEMA_DLGS
|
|||
dialogs/dialog_global_edit_text_and_graphics_base.cpp
|
||||
dialogs/dialog_junction_props.cpp
|
||||
dialogs/dialog_junction_props_base.cpp
|
||||
dialogs/dialog_lib_edit_draw_item.cpp
|
||||
dialogs/dialog_lib_edit_draw_item_base.cpp
|
||||
dialogs/dialog_lib_edit_pin_table.cpp
|
||||
dialogs/dialog_lib_edit_pin_table_base.cpp
|
||||
dialogs/dialog_lib_edit_text.cpp
|
||||
dialogs/dialog_lib_edit_text_base.cpp
|
||||
dialogs/dialog_lib_text_properties.cpp
|
||||
dialogs/dialog_lib_text_properties_base.cpp
|
||||
dialogs/dialog_lib_new_symbol.cpp
|
||||
dialogs/dialog_lib_new_symbol_base.cpp
|
||||
dialogs/dialog_lib_shape_properties.cpp
|
||||
dialogs/dialog_lib_shape_properties_base.cpp
|
||||
dialogs/dialog_line_wire_bus_properties.cpp
|
||||
dialogs/dialog_line_wire_bus_properties_base.cpp
|
||||
dialogs/dialog_migrate_buses.cpp
|
||||
|
@ -106,6 +104,8 @@ set( EESCHEMA_DLGS
|
|||
dialogs/dialog_symbol_properties_base.cpp
|
||||
dialogs/dialog_symbol_remap.cpp
|
||||
dialogs/dialog_symbol_remap_base.cpp
|
||||
dialogs/dialog_text_and_label_properties.cpp
|
||||
dialogs/dialog_text_and_label_properties_base.cpp
|
||||
dialogs/dialog_update_from_pcb.cpp
|
||||
dialogs/dialog_update_from_pcb_base.cpp
|
||||
dialogs/dialog_update_symbol_fields.cpp
|
||||
|
|
|
@ -36,15 +36,15 @@
|
|||
#include <symbol_library.h>
|
||||
#include <sch_validators.h>
|
||||
#include <schematic.h>
|
||||
#include <dialog_edit_one_field.h>
|
||||
#include <dialog_field_properties.h>
|
||||
#include <sch_text.h>
|
||||
#include <scintilla_tricks.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
|
||||
DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const EDA_TEXT* aTextItem ) :
|
||||
DIALOG_LIB_EDIT_TEXT_BASE( aParent ),
|
||||
DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const EDA_TEXT* aTextItem ) :
|
||||
DIALOG_LIB_TEXT_PROPERTIES_BASE( aParent ),
|
||||
m_posX( aParent, m_xPosLabel, m_xPosCtrl, m_xPosUnits, true ),
|
||||
m_posY( aParent, m_yPosLabel, m_yPosCtrl, m_yPosUnits, true ),
|
||||
m_textSize( aParent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, true ),
|
||||
|
@ -78,13 +78,13 @@ DIALOG_EDIT_ONE_FIELD::DIALOG_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxS
|
|||
}
|
||||
|
||||
|
||||
DIALOG_EDIT_ONE_FIELD::~DIALOG_EDIT_ONE_FIELD()
|
||||
DIALOG_FIELD_PROPERTIES::~DIALOG_FIELD_PROPERTIES()
|
||||
{
|
||||
delete m_scintillaTricks;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_ONE_FIELD::init()
|
||||
void DIALOG_FIELD_PROPERTIES::init()
|
||||
{
|
||||
SCH_BASE_FRAME* parent = GetParent();
|
||||
bool isSymbolEditor = parent && parent->IsType( FRAME_SCH_SYMBOL_EDITOR );
|
||||
|
@ -155,7 +155,7 @@ void DIALOG_EDIT_ONE_FIELD::init()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent )
|
||||
void DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick( wxCommandEvent& aEvent )
|
||||
{
|
||||
// pick a footprint using the footprint picker.
|
||||
wxString fpid;
|
||||
|
@ -179,7 +179,7 @@ void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_ONE_FIELD::OnSetFocusText( wxFocusEvent& event )
|
||||
void DIALOG_FIELD_PROPERTIES::OnSetFocusText( wxFocusEvent& event )
|
||||
{
|
||||
if( m_firstFocus )
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ void DIALOG_EDIT_ONE_FIELD::OnSetFocusText( wxFocusEvent& event )
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_EDIT_ONE_FIELD::TransferDataToWindow()
|
||||
bool DIALOG_FIELD_PROPERTIES::TransferDataToWindow()
|
||||
{
|
||||
if( m_TextCtrl->IsShown() )
|
||||
m_TextCtrl->SetValue( m_text );
|
||||
|
@ -227,7 +227,7 @@ bool DIALOG_EDIT_ONE_FIELD::TransferDataToWindow()
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_EDIT_ONE_FIELD::TransferDataFromWindow()
|
||||
bool DIALOG_FIELD_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( m_TextCtrl->IsShown() )
|
||||
m_text = m_TextCtrl->GetValue();
|
||||
|
@ -277,7 +277,7 @@ bool DIALOG_EDIT_ONE_FIELD::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_ONE_FIELD::updateText( EDA_TEXT* aText )
|
||||
void DIALOG_FIELD_PROPERTIES::updateText( EDA_TEXT* aText )
|
||||
{
|
||||
aText->SetTextPos( m_position );
|
||||
aText->SetTextSize( wxSize( m_size, m_size ) );
|
||||
|
@ -290,10 +290,10 @@ void DIALOG_EDIT_ONE_FIELD::updateText( EDA_TEXT* aText )
|
|||
}
|
||||
|
||||
|
||||
DIALOG_LIB_EDIT_ONE_FIELD::DIALOG_LIB_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent,
|
||||
const wxString& aTitle,
|
||||
const LIB_FIELD* aField ) :
|
||||
DIALOG_EDIT_ONE_FIELD( aParent, aTitle, aField )
|
||||
DIALOG_LIB_FIELD_PROPERTIES::DIALOG_LIB_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent,
|
||||
const wxString& aTitle,
|
||||
const LIB_FIELD* aField ) :
|
||||
DIALOG_FIELD_PROPERTIES( aParent, aTitle, aField )
|
||||
{
|
||||
m_fieldId = aField->GetId();
|
||||
|
||||
|
@ -306,10 +306,10 @@ DIALOG_LIB_EDIT_ONE_FIELD::DIALOG_LIB_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent,
|
|||
}
|
||||
|
||||
|
||||
DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent,
|
||||
const wxString& aTitle,
|
||||
const SCH_FIELD* aField ) :
|
||||
DIALOG_EDIT_ONE_FIELD( aParent, aTitle, aField ),
|
||||
DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent,
|
||||
const wxString& aTitle,
|
||||
const SCH_FIELD* aField ) :
|
||||
DIALOG_FIELD_PROPERTIES( aParent, aTitle, aField ),
|
||||
m_field( aField )
|
||||
{
|
||||
if( aField->GetParent() && aField->GetParent()->Type() == SCH_SYMBOL_T )
|
||||
|
@ -347,13 +347,13 @@ DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent,
|
|||
}
|
||||
|
||||
m_StyledTextCtrl->Bind( wxEVT_STC_CHARADDED,
|
||||
&DIALOG_SCH_EDIT_ONE_FIELD::onScintillaCharAdded, this );
|
||||
&DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded, this );
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_EDIT_ONE_FIELD::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
||||
void DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
||||
{
|
||||
int key = aEvent.GetKey();
|
||||
|
||||
|
@ -443,7 +443,7 @@ void DIALOG_SCH_EDIT_ONE_FIELD::onScintillaCharAdded( wxStyledTextEvent &aEvent
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH* aSheetPath )
|
||||
void DIALOG_SCH_FIELD_PROPERTIES::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH* aSheetPath )
|
||||
{
|
||||
SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( GetParent() );
|
||||
SCH_ITEM* parent = dynamic_cast<SCH_ITEM*>( aField->GetParent() );
|
|
@ -27,7 +27,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <dialog_lib_edit_text_base.h>
|
||||
#include <dialog_lib_text_properties_base.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <lib_field.h>
|
||||
#include <template_fieldnames.h>
|
||||
|
@ -44,13 +44,13 @@ class SCINTILLA_TRICKS;
|
|||
* This class is setup in expectation of its children possibly using Kiway player so
|
||||
* #DIALOG_SHIM::ShowQuasiModal is required when calling any subclasses.
|
||||
*/
|
||||
class DIALOG_EDIT_ONE_FIELD : public DIALOG_LIB_EDIT_TEXT_BASE
|
||||
class DIALOG_FIELD_PROPERTIES : public DIALOG_LIB_TEXT_PROPERTIES_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const EDA_TEXT* aTextItem );
|
||||
DIALOG_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const EDA_TEXT* aTextItem );
|
||||
|
||||
~DIALOG_EDIT_ONE_FIELD() override;
|
||||
~DIALOG_FIELD_PROPERTIES() override;
|
||||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
@ -103,17 +103,17 @@ protected:
|
|||
|
||||
|
||||
/**
|
||||
* Handle editing a single symbol field in the library editor.
|
||||
* Handle editing a single symbol field in the symbol editor.
|
||||
*
|
||||
* @note Use ShowQuasiModal when calling this class!
|
||||
*/
|
||||
class DIALOG_LIB_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD
|
||||
class DIALOG_LIB_FIELD_PROPERTIES : public DIALOG_FIELD_PROPERTIES
|
||||
{
|
||||
public:
|
||||
DIALOG_LIB_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const LIB_FIELD* aField );
|
||||
DIALOG_LIB_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const LIB_FIELD* aField );
|
||||
|
||||
~DIALOG_LIB_EDIT_ONE_FIELD() {}
|
||||
~DIALOG_LIB_FIELD_PROPERTIES() {}
|
||||
|
||||
void UpdateField( LIB_FIELD* aField )
|
||||
{
|
||||
|
@ -138,13 +138,13 @@ public:
|
|||
*
|
||||
* @note Use ShowQuasiModal when calling this class!
|
||||
*/
|
||||
class DIALOG_SCH_EDIT_ONE_FIELD : public DIALOG_EDIT_ONE_FIELD
|
||||
class DIALOG_SCH_FIELD_PROPERTIES : public DIALOG_FIELD_PROPERTIES
|
||||
{
|
||||
public:
|
||||
DIALOG_SCH_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const SCH_FIELD* aField );
|
||||
DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const wxString& aTitle,
|
||||
const SCH_FIELD* aField );
|
||||
|
||||
~DIALOG_SCH_EDIT_ONE_FIELD() {}
|
||||
~DIALOG_SCH_FIELD_PROPERTIES() {}
|
||||
|
||||
void onScintillaCharAdded( wxStyledTextEvent &aEvent );
|
||||
|
|
@ -21,19 +21,15 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file dialog_lib_edit_draw_item.cpp
|
||||
*/
|
||||
|
||||
#include <lib_item.h>
|
||||
#include <dialog_lib_edit_draw_item.h>
|
||||
#include <dialog_lib_shape_properties.h>
|
||||
#include <symbol_edit_frame.h>
|
||||
#include <confirm.h>
|
||||
|
||||
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( SYMBOL_EDIT_FRAME* aParent,
|
||||
LIB_ITEM* aItem ) :
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM_BASE( aParent ),
|
||||
DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* aParent,
|
||||
LIB_ITEM* aItem ) :
|
||||
DIALOG_LIB_SHAPE_PROPERTIES_BASE( aParent ),
|
||||
m_frame( aParent ),
|
||||
m_item( aItem ),
|
||||
m_lineWidth( aParent, m_widthLabel, m_widthCtrl, m_widthUnits, true )
|
||||
|
@ -61,7 +57,7 @@ DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( SYMBOL_EDIT_FRAME* aParent
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_LIB_EDIT_DRAW_ITEM::TransferDataToWindow()
|
||||
bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow()
|
||||
{
|
||||
if( !wxDialog::TransferDataToWindow() )
|
||||
return false;
|
||||
|
@ -91,7 +87,7 @@ bool DIALOG_LIB_EDIT_DRAW_ITEM::TransferDataToWindow()
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_LIB_EDIT_DRAW_ITEM::TransferDataFromWindow()
|
||||
bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( !wxDialog::TransferDataFromWindow() )
|
||||
return false;
|
||||
|
@ -115,13 +111,13 @@ bool DIALOG_LIB_EDIT_DRAW_ITEM::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_LIB_EDIT_DRAW_ITEM::GetApplyToAllConversions()
|
||||
bool DIALOG_LIB_SHAPE_PROPERTIES::GetApplyToAllConversions()
|
||||
{
|
||||
return m_checkApplyToAllConversions->IsChecked();
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_LIB_EDIT_DRAW_ITEM::GetApplyToAllUnits()
|
||||
bool DIALOG_LIB_SHAPE_PROPERTIES::GetApplyToAllUnits()
|
||||
{
|
||||
return m_checkApplyToAllUnits->IsChecked();
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -22,25 +22,25 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __dialog_lib_edit_draw_item__
|
||||
#define __dialog_lib_edit_draw_item__
|
||||
#ifndef DIALOG_LIB_SHAPE_PROPERTIES_H
|
||||
#define DIALOG_LIB_SHAPE_PROPERTIES_H
|
||||
|
||||
|
||||
class LIB_ITEM;
|
||||
class SYMBOL_EDIT_FRAME;
|
||||
|
||||
|
||||
#include <dialog_lib_edit_draw_item_base.h>
|
||||
#include <dialog_lib_shape_properties_base.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
/**
|
||||
* Dialog to edit library component graphic items.
|
||||
*/
|
||||
class DIALOG_LIB_EDIT_DRAW_ITEM : public DIALOG_LIB_EDIT_DRAW_ITEM_BASE
|
||||
class DIALOG_LIB_SHAPE_PROPERTIES : public DIALOG_LIB_SHAPE_PROPERTIES_BASE
|
||||
{
|
||||
public:
|
||||
/** Constructor */
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM( SYMBOL_EDIT_FRAME* parent, LIB_ITEM* aItem );
|
||||
DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_ITEM* aItem );
|
||||
|
||||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
@ -54,4 +54,4 @@ private:
|
|||
UNIT_BINDER m_lineWidth;
|
||||
};
|
||||
|
||||
#endif // __dialog_lib_edit_draw_item__
|
||||
#endif // DIALOG_LIB_SHAPE_PROPERTIES_H
|
|
@ -1,15 +1,15 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_lib_edit_draw_item_base.h"
|
||||
#include "dialog_lib_shape_properties_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
DIALOG_LIB_SHAPE_PROPERTIES_BASE::DIALOG_LIB_SHAPE_PROPERTIES_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 );
|
||||
|
||||
|
@ -71,6 +71,6 @@ DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent
|
|||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM_BASE::~DIALOG_LIB_EDIT_DRAW_ITEM_BASE()
|
||||
DIALOG_LIB_SHAPE_PROPERTIES_BASE::~DIALOG_LIB_SHAPE_PROPERTIES_BASE()
|
||||
{
|
||||
}
|
|
@ -11,13 +11,12 @@
|
|||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">table</property>
|
||||
<property name="file">dialog_lib_edit_draw_item_base</property>
|
||||
<property name="file">dialog_lib_shape_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_lib_edit_draw_item</property>
|
||||
<property name="name">dialog_lib_shape_properties</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
|
@ -26,7 +25,6 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -45,7 +43,7 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_LIB_EDIT_DRAW_ITEM_BASE</property>
|
||||
<property name="name">DIALOG_LIB_SHAPE_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -28,9 +28,9 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_LIB_EDIT_DRAW_ITEM_BASE
|
||||
/// Class DIALOG_LIB_SHAPE_PROPERTIES_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM
|
||||
class DIALOG_LIB_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -48,8 +48,8 @@ class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drawing Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIB_EDIT_DRAW_ITEM_BASE();
|
||||
DIALOG_LIB_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drawing Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIB_SHAPE_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -25,16 +25,17 @@
|
|||
#include <symbol_edit_frame.h>
|
||||
#include <lib_text.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <dialog_lib_edit_text.h>
|
||||
#include <dialog_lib_text_properties.h>
|
||||
#include <symbol_editor/symbol_editor_settings.h>
|
||||
#include <tools/symbol_editor_drawing_tools.h>
|
||||
|
||||
|
||||
DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT( SYMBOL_EDIT_FRAME* aParent, LIB_TEXT* aText ) :
|
||||
DIALOG_LIB_EDIT_TEXT_BASE( aParent ),
|
||||
m_posX( aParent, m_xPosLabel, m_xPosCtrl, m_xPosUnits, true ),
|
||||
m_posY( aParent, m_yPosLabel, m_yPosCtrl, m_yPosUnits, true ),
|
||||
m_textSize( aParent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, true )
|
||||
DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES( SYMBOL_EDIT_FRAME* aParent,
|
||||
LIB_TEXT* aText ) :
|
||||
DIALOG_LIB_TEXT_PROPERTIES_BASE( aParent ),
|
||||
m_posX( aParent, m_xPosLabel, m_xPosCtrl, m_xPosUnits, true ),
|
||||
m_posY( aParent, m_yPosLabel, m_yPosCtrl, m_yPosUnits, true ),
|
||||
m_textSize( aParent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, true )
|
||||
{
|
||||
m_parent = aParent;
|
||||
m_graphicText = aText;
|
||||
|
@ -65,7 +66,7 @@ DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT( SYMBOL_EDIT_FRAME* aParent, LIB_TEXT
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_LIB_EDIT_TEXT::TransferDataToWindow()
|
||||
bool DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow()
|
||||
{
|
||||
if( m_graphicText )
|
||||
{
|
||||
|
@ -110,7 +111,7 @@ bool DIALOG_LIB_EDIT_TEXT::TransferDataToWindow()
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow()
|
||||
bool DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( m_graphicText )
|
||||
{
|
|
@ -23,21 +23,21 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef _DIALOG_LIB_EDIT_TEXT_H_
|
||||
#define _DIALOG_LIB_EDIT_TEXT_H_
|
||||
#ifndef DIALOG_LIB_TEXT_PROPERTIES_H
|
||||
#define DIALOG_LIB_TEXT_PROPERTIES_H
|
||||
|
||||
#include <dialog_lib_edit_text_base.h>
|
||||
#include <dialog_lib_text_properties_base.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
class SYMBOL_EDIT_FRAME;
|
||||
class LIB_TEXT;
|
||||
|
||||
|
||||
class DIALOG_LIB_EDIT_TEXT : public DIALOG_LIB_EDIT_TEXT_BASE
|
||||
class DIALOG_LIB_TEXT_PROPERTIES : public DIALOG_LIB_TEXT_PROPERTIES_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_LIB_EDIT_TEXT( SYMBOL_EDIT_FRAME* aParent, LIB_TEXT* aText );
|
||||
~DIALOG_LIB_EDIT_TEXT() override {};
|
||||
DIALOG_LIB_TEXT_PROPERTIES( SYMBOL_EDIT_FRAME* aParent, LIB_TEXT* aText );
|
||||
~DIALOG_LIB_TEXT_PROPERTIES() override {};
|
||||
|
||||
private:
|
||||
bool TransferDataToWindow() override;
|
||||
|
@ -52,4 +52,4 @@ private:
|
|||
};
|
||||
|
||||
|
||||
#endif // _DIALOG_LIB_EDIT_TEXT_H_
|
||||
#endif // DIALOG_LIB_TEXT_PROPERTIES_H
|
|
@ -5,11 +5,11 @@
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_lib_edit_text_base.h"
|
||||
#include "dialog_lib_text_properties_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
DIALOG_LIB_TEXT_PROPERTIES_BASE::DIALOG_LIB_TEXT_PROPERTIES_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 );
|
||||
|
||||
|
@ -217,18 +217,18 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
|
|||
this->Layout();
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
|
||||
m_TextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
|
||||
m_StyledTextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
|
||||
m_TextValueSelectButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnCloseDialog ) );
|
||||
m_TextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
|
||||
m_StyledTextCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
|
||||
m_TextValueSelectButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnTextValueSelectButtonClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_LIB_EDIT_TEXT_BASE::~DIALOG_LIB_EDIT_TEXT_BASE()
|
||||
DIALOG_LIB_TEXT_PROPERTIES_BASE::~DIALOG_LIB_TEXT_PROPERTIES_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
|
||||
m_TextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
|
||||
m_StyledTextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnSetFocusText ), NULL, this );
|
||||
m_TextValueSelectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnCloseDialog ) );
|
||||
m_TextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
|
||||
m_StyledTextCtrl->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
|
||||
m_TextValueSelectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_TEXT_PROPERTIES_BASE::OnTextValueSelectButtonClick ), NULL, this );
|
||||
|
||||
}
|
|
@ -11,12 +11,12 @@
|
|||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_lib_edit_text_base</property>
|
||||
<property name="file">dialog_lib_text_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">DIALOG_LIB_EDIT_TEXT_BASE</property>
|
||||
<property name="name">DIALOG_LIB_TEXT_PROPERTIES_BASE</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_LIB_EDIT_TEXT_BASE</property>
|
||||
<property name="name">DIALOG_LIB_TEXT_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">739,340</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
|
@ -33,9 +33,9 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_LIB_EDIT_TEXT_BASE
|
||||
/// Class DIALOG_LIB_TEXT_PROPERTIES_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
|
||||
class DIALOG_LIB_TEXT_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -78,8 +78,8 @@ class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Item Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 739,340 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIB_EDIT_TEXT_BASE();
|
||||
DIALOG_LIB_TEXT_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Item Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 739,340 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIB_TEXT_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
#include <sch_reference_list.h>
|
||||
#include <schematic.h>
|
||||
#include <dialogs/html_messagebox.h>
|
||||
#include <dialog_edit_label.h>
|
||||
#include <dialog_text_and_label_properties.h>
|
||||
#include <string_utils.h>
|
||||
#include <tool/actions.h>
|
||||
#include <scintilla_tricks.h>
|
||||
|
@ -43,12 +43,13 @@ class SCH_EDIT_FRAME;
|
|||
class SCH_TEXT;
|
||||
|
||||
|
||||
DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTextItem ) :
|
||||
DIALOG_LABEL_EDITOR_BASE( aParent ),
|
||||
m_textSize( aParent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, false ),
|
||||
m_netNameValidator( true ),
|
||||
m_scintillaTricks( nullptr ),
|
||||
m_helpWindow( nullptr )
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||
SCH_TEXT* aTextItem ) :
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE( aParent ),
|
||||
m_textSize( aParent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, false ),
|
||||
m_netNameValidator( true ),
|
||||
m_scintillaTricks( nullptr ),
|
||||
m_helpWindow( nullptr )
|
||||
{
|
||||
m_Parent = aParent;
|
||||
m_CurrentText = aTextItem;
|
||||
|
@ -101,11 +102,11 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe
|
|||
|
||||
switch( m_CurrentText->Type() )
|
||||
{
|
||||
case SCH_GLOBAL_LABEL_T: SetTitle( _( "Global Label Properties" ) ); break;
|
||||
case SCH_HIER_LABEL_T: SetTitle( _( "Hierarchical Label Properties" ) ); break;
|
||||
case SCH_LABEL_T: SetTitle( _( "Label Properties" ) ); break;
|
||||
case SCH_SHEET_PIN_T: SetTitle( _( "Hierarchical Sheet Pin Properties" ) ); break;
|
||||
default: SetTitle( _( "Text Properties" ) ); break;
|
||||
case SCH_GLOBAL_LABEL_T: SetTitle( _( "Global Label Properties" ) ); break;
|
||||
case SCH_HIER_LABEL_T: SetTitle( _( "Hierarchical Label Properties" ) ); break;
|
||||
case SCH_LABEL_T: SetTitle( _( "Label Properties" ) ); break;
|
||||
case SCH_SHEET_PIN_T: SetTitle( _( "Hierarchical Sheet Pin Properties" ) ); break;
|
||||
default: SetTitle( _( "Text Properties" ) ); break;
|
||||
}
|
||||
|
||||
SetInitialFocus( m_activeTextCtrl );
|
||||
|
@ -129,7 +130,7 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe
|
|||
m_sdbSizer1OK->SetDefault();
|
||||
Layout();
|
||||
|
||||
m_valueMultiLine->Bind( wxEVT_STC_CHARADDED, &DIALOG_LABEL_EDITOR::onScintillaCharAdded, this );
|
||||
m_valueMultiLine->Bind( wxEVT_STC_CHARADDED, &DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded, this );
|
||||
|
||||
// DIALOG_SHIM needs a unique hash_key because classname is not sufficient because the
|
||||
// various versions have different controls so we want to store sizes for each version.
|
||||
|
@ -141,7 +142,7 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe
|
|||
}
|
||||
|
||||
|
||||
DIALOG_LABEL_EDITOR::~DIALOG_LABEL_EDITOR()
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES::~DIALOG_TEXT_AND_LABEL_PROPERTIES()
|
||||
{
|
||||
delete m_scintillaTricks;
|
||||
|
||||
|
@ -150,7 +151,7 @@ DIALOG_LABEL_EDITOR::~DIALOG_LABEL_EDITOR()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_LABEL_EDITOR::SetTitle( const wxString& aTitle )
|
||||
void DIALOG_TEXT_AND_LABEL_PROPERTIES::SetTitle( const wxString& aTitle )
|
||||
{
|
||||
// This class is shared for numerous tasks: a couple of single line labels and
|
||||
// multi-line text fields. Since the desired size of the multi-line text field editor
|
||||
|
@ -168,11 +169,11 @@ void DIALOG_LABEL_EDITOR::SetTitle( const wxString& aTitle )
|
|||
m_hash_key += typeid(*this).name();
|
||||
}
|
||||
|
||||
DIALOG_LABEL_EDITOR_BASE::SetTitle( aTitle );
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::SetTitle( aTitle );
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_LABEL_EDITOR::TransferDataToWindow()
|
||||
bool DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataToWindow()
|
||||
{
|
||||
if( !wxDialog::TransferDataToWindow() )
|
||||
return false;
|
||||
|
@ -238,13 +239,13 @@ bool DIALOG_LABEL_EDITOR::TransferDataToWindow()
|
|||
/*!
|
||||
* wxEVT_COMMAND_ENTER event handler for single-line control
|
||||
*/
|
||||
void DIALOG_LABEL_EDITOR::OnEnterKey( wxCommandEvent& aEvent )
|
||||
void DIALOG_TEXT_AND_LABEL_PROPERTIES::OnEnterKey( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_LABEL_EDITOR::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
||||
void DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
||||
{
|
||||
wxStyledTextCtrl* te = m_valueMultiLine;
|
||||
wxArrayString autocompleteTokens;
|
||||
|
@ -307,7 +308,7 @@ void DIALOG_LABEL_EDITOR::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_LABEL_EDITOR::TransferDataFromWindow()
|
||||
bool DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
if( !wxDialog::TransferDataFromWindow() )
|
||||
return false;
|
||||
|
@ -385,7 +386,7 @@ bool DIALOG_LABEL_EDITOR::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_LABEL_EDITOR::OnFormattingHelp( wxHyperlinkEvent& aEvent )
|
||||
void DIALOG_TEXT_AND_LABEL_PROPERTIES::OnFormattingHelp( wxHyperlinkEvent& aEvent )
|
||||
{
|
||||
m_helpWindow = SCH_TEXT::ShowSyntaxHelp( this );
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -21,13 +21,13 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef DIALOG_LABEL_EDITOR_H_
|
||||
#define DIALOG_LABEL_EDITOR_H_
|
||||
#ifndef DIALOG_TEXT_AND_LABEL_PROPERTIES_H
|
||||
#define DIALOG_TEXT_AND_LABEL_PROPERTIES_H
|
||||
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <sch_text.h>
|
||||
#include <sch_validators.h>
|
||||
#include <dialog_edit_label_base.h>
|
||||
#include <dialog_text_and_label_properties_base.h>
|
||||
|
||||
|
||||
class SCH_EDIT_FRAME;
|
||||
|
@ -36,11 +36,11 @@ class SCINTILLA_TRICKS;
|
|||
class HTML_MESSAGE_BOX;
|
||||
|
||||
|
||||
class DIALOG_LABEL_EDITOR : public DIALOG_LABEL_EDITOR_BASE
|
||||
class DIALOG_TEXT_AND_LABEL_PROPERTIES : public DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* parent, SCH_TEXT* aTextItem );
|
||||
~DIALOG_LABEL_EDITOR();
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES( SCH_EDIT_FRAME* parent, SCH_TEXT* aTextItem );
|
||||
~DIALOG_TEXT_AND_LABEL_PROPERTIES();
|
||||
|
||||
// This class is shared for numerous tasks: a couple of single line labels and
|
||||
// multi-line text fields. Since the desired size of the multi-line text field editor
|
||||
|
@ -69,4 +69,4 @@ private:
|
|||
|
||||
|
||||
|
||||
#endif // DIALOG_LABEL_EDITOR_H_
|
||||
#endif // DIALOG_TEXT_AND_LABEL_PROPERTIES_H
|
|
@ -1,15 +1,15 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_edit_label_base.h"
|
||||
#include "dialog_text_and_label_properties_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::DIALOG_TEXT_AND_LABEL_PROPERTIES_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 );
|
||||
|
||||
|
@ -159,16 +159,16 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
|||
bMainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_valueSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
|
||||
m_valueCombo->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
|
||||
m_formattingHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_LABEL_EDITOR_BASE::OnFormattingHelp ), NULL, this );
|
||||
m_valueSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::OnEnterKey ), NULL, this );
|
||||
m_valueCombo->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::OnEnterKey ), NULL, this );
|
||||
m_formattingHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::OnFormattingHelp ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_LABEL_EDITOR_BASE::~DIALOG_LABEL_EDITOR_BASE()
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::~DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_valueSingleLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
|
||||
m_valueCombo->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
|
||||
m_formattingHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_LABEL_EDITOR_BASE::OnFormattingHelp ), NULL, this );
|
||||
m_valueSingleLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::OnEnterKey ), NULL, this );
|
||||
m_valueCombo->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::OnEnterKey ), NULL, this );
|
||||
m_formattingHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE::OnFormattingHelp ), NULL, this );
|
||||
|
||||
}
|
|
@ -11,13 +11,12 @@
|
|||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_edit_label_base</property>
|
||||
<property name="file">dialog_text_and_label_properties_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_edit_label_base</property>
|
||||
<property name="name">dialog_text_and_label_properties_base</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
|
@ -26,7 +25,6 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -45,12 +43,12 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_LABEL_EDITOR_BASE</property>
|
||||
<property name="name">DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Text Editor</property>
|
||||
<property name="title">Text Properties</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -29,9 +29,9 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_LABEL_EDITOR_BASE
|
||||
/// Class DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_LABEL_EDITOR_BASE : public DIALOG_SHIM
|
||||
class DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -69,8 +69,8 @@ class DIALOG_LABEL_EDITOR_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LABEL_EDITOR_BASE();
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_TEXT_AND_LABEL_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -38,7 +38,7 @@ class SCH_EDIT_FRAME;
|
|||
class SYMBOL_LIB_TABLE;
|
||||
class LIB_SYMBOL;
|
||||
class LIB_FIELD;
|
||||
class DIALOG_LIB_EDIT_TEXT;
|
||||
class DIALOG_LIB_TEXT_PROPERTIES;
|
||||
class SYMBOL_TREE_PANE;
|
||||
class LIB_TREE_NODE;
|
||||
class LIB_ID;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <schematic.h>
|
||||
#include <symbol_library.h>
|
||||
#include <eeschema_settings.h>
|
||||
#include <dialogs/dialog_edit_label.h>
|
||||
#include <dialogs/dialog_text_and_label_properties.h>
|
||||
#include <dialogs/dialog_line_wire_bus_properties.h>
|
||||
#include <dialogs/dialog_junction_props.h>
|
||||
#include <dialogs/dialog_sheet_pin_properties.h>
|
||||
|
@ -899,7 +899,7 @@ SCH_TEXT* SCH_DRAWING_TOOLS::createNewText( const VECTOR2I& aPosition, int aType
|
|||
textItem->SetTextSize( wxSize( settings.m_DefaultTextSize, settings.m_DefaultTextSize ) );
|
||||
textItem->SetFlags( IS_NEW | IS_MOVING );
|
||||
|
||||
DIALOG_LABEL_EDITOR dlg( m_frame, textItem );
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES dlg( m_frame, textItem );
|
||||
|
||||
// Must be quasi modal for syntax help
|
||||
if( dlg.ShowQuasiModal() != wxID_OK || NoPrintableChars( textItem->GetText() ) )
|
||||
|
|
|
@ -57,14 +57,14 @@
|
|||
#include <dialogs/dialog_line_wire_bus_properties.h>
|
||||
#include <dialogs/dialog_symbol_properties.h>
|
||||
#include <dialogs/dialog_sheet_pin_properties.h>
|
||||
#include <dialogs/dialog_edit_one_field.h>
|
||||
#include <dialogs/dialog_field_properties.h>
|
||||
#include <dialogs/dialog_junction_props.h>
|
||||
#include "sch_drawing_tools.h"
|
||||
#include <math/util.h> // for KiROUND
|
||||
#include <pgm_base.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <symbol_editor_settings.h>
|
||||
#include <dialogs/dialog_edit_label.h>
|
||||
#include <dialogs/dialog_text_and_label_properties.h>
|
||||
#include <core/kicad_algo.h>
|
||||
//#include <wx/filedlg.h>
|
||||
#include <wx/textdlg.h>
|
||||
|
@ -1093,7 +1093,7 @@ void SCH_EDIT_TOOL::editFieldText( SCH_FIELD* aField )
|
|||
else
|
||||
caption.Printf( _( "Edit '%s' Field" ), aField->GetName() );
|
||||
|
||||
DIALOG_SCH_EDIT_ONE_FIELD dlg( m_frame, caption, aField );
|
||||
DIALOG_SCH_FIELD_PROPERTIES dlg( m_frame, caption, aField );
|
||||
|
||||
// The footprint field dialog can invoke a KIWAY_PLAYER so we must use a quasi-modal
|
||||
if( dlg.ShowQuasiModal() != wxID_OK )
|
||||
|
@ -1398,7 +1398,7 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
|||
case SCH_GLOBAL_LABEL_T:
|
||||
case SCH_HIER_LABEL_T:
|
||||
{
|
||||
DIALOG_LABEL_EDITOR dlg( m_frame, (SCH_TEXT*) item );
|
||||
DIALOG_TEXT_AND_LABEL_PROPERTIES dlg( m_frame, (SCH_TEXT*) item );
|
||||
|
||||
// Must be quasi modal for syntax help
|
||||
if( dlg.ShowQuasiModal() == wxID_OK )
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <tools/symbol_editor_pin_tool.h>
|
||||
#include <bitmaps.h>
|
||||
#include <lib_text.h>
|
||||
#include <dialogs/dialog_lib_edit_text.h>
|
||||
#include <dialogs/dialog_lib_text_properties.h>
|
||||
#include <lib_arc.h>
|
||||
#include <lib_circle.h>
|
||||
#include <lib_polyline.h>
|
||||
|
@ -175,7 +175,7 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
|||
Mils2iu( settings->m_Defaults.text_size ) ) );
|
||||
text->SetTextAngle( m_lastTextAngle );
|
||||
|
||||
DIALOG_LIB_EDIT_TEXT dlg( m_frame, text );
|
||||
DIALOG_LIB_TEXT_PROPERTIES dlg( m_frame, text );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK || NoPrintableChars( text->GetText() ) )
|
||||
delete text;
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
#include <bitmaps.h>
|
||||
#include <string_utils.h>
|
||||
#include <symbol_edit_frame.h>
|
||||
#include <dialogs/dialog_lib_edit_draw_item.h>
|
||||
#include <dialogs/dialog_lib_edit_text.h>
|
||||
#include <dialogs/dialog_edit_one_field.h>
|
||||
#include <dialogs/dialog_lib_shape_properties.h>
|
||||
#include <dialogs/dialog_lib_text_properties.h>
|
||||
#include <dialogs/dialog_field_properties.h>
|
||||
#include <dialogs/dialog_lib_symbol_properties.h>
|
||||
#include <dialogs/dialog_lib_edit_pin_table.h>
|
||||
#include <dialogs/dialog_update_symbol_fields.h>
|
||||
|
@ -468,10 +468,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
|||
|
||||
void SYMBOL_EDITOR_EDIT_TOOL::editGraphicProperties( LIB_ITEM* aItem )
|
||||
{
|
||||
if( aItem == nullptr )
|
||||
return;
|
||||
|
||||
DIALOG_LIB_EDIT_DRAW_ITEM dlg( m_frame, aItem );
|
||||
DIALOG_LIB_SHAPE_PROPERTIES dlg( m_frame, aItem );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
@ -492,10 +489,10 @@ void SYMBOL_EDITOR_EDIT_TOOL::editGraphicProperties( LIB_ITEM* aItem )
|
|||
|
||||
void SYMBOL_EDITOR_EDIT_TOOL::editTextProperties( LIB_ITEM* aItem )
|
||||
{
|
||||
if ( ( aItem == nullptr ) || ( aItem->Type() != LIB_TEXT_T ) )
|
||||
if ( aItem->Type() != LIB_TEXT_T )
|
||||
return;
|
||||
|
||||
DIALOG_LIB_EDIT_TEXT dlg( m_frame, (LIB_TEXT*) aItem );
|
||||
DIALOG_LIB_TEXT_PROPERTIES dlg( m_frame, (LIB_TEXT*) aItem );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
@ -524,7 +521,7 @@ void SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties( LIB_FIELD* aField )
|
|||
else
|
||||
caption.Printf( _( "Edit '%s' Field" ), aField->GetName() );
|
||||
|
||||
DIALOG_LIB_EDIT_ONE_FIELD dlg( m_frame, caption, aField );
|
||||
DIALOG_LIB_FIELD_PROPERTIES dlg( m_frame, caption, aField );
|
||||
|
||||
// The dialog may invoke a kiway player for footprint fields
|
||||
// so we must use a quasimodal dialog.
|
||||
|
|
Loading…
Reference in New Issue