2020-05-23 15:50:08 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2022-01-25 22:33:37 +00:00
|
|
|
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2020-05-23 15:50:08 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2021-10-12 20:05:37 +00:00
|
|
|
#ifndef DIALOG_LABEL_PROPERTIES_H
|
|
|
|
#define DIALOG_LABEL_PROPERTIES_H
|
2020-05-23 15:50:08 +00:00
|
|
|
|
2021-10-12 20:05:37 +00:00
|
|
|
#include <fields_grid_table.h>
|
2020-05-23 15:50:08 +00:00
|
|
|
#include <widgets/unit_binder.h>
|
|
|
|
#include <sch_validators.h>
|
2021-10-12 20:05:37 +00:00
|
|
|
#include <dialog_label_properties_base.h>
|
2020-05-23 15:50:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SCH_EDIT_FRAME;
|
2020-09-05 16:00:29 +00:00
|
|
|
class HTML_MESSAGE_BOX;
|
2020-05-23 15:50:08 +00:00
|
|
|
|
|
|
|
|
2021-10-12 20:05:37 +00:00
|
|
|
class DIALOG_LABEL_PROPERTIES : public DIALOG_LABEL_PROPERTIES_BASE
|
2020-05-23 15:50:08 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-10-12 20:05:37 +00:00
|
|
|
DIALOG_LABEL_PROPERTIES( SCH_EDIT_FRAME* parent, SCH_LABEL_BASE* aLabel );
|
|
|
|
~DIALOG_LABEL_PROPERTIES();
|
2020-05-23 15:50:08 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void OnEnterKey( wxCommandEvent& aEvent ) override;
|
2022-05-06 16:00:34 +00:00
|
|
|
void OnValueCharHook( wxKeyEvent& aEvent ) override;
|
2020-05-23 15:50:08 +00:00
|
|
|
void OnFormattingHelp( wxHyperlinkEvent& aEvent ) override;
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
void onSpinButton( wxCommandEvent &aEvent );
|
|
|
|
|
|
|
|
// event handlers
|
|
|
|
void OnAddField( wxCommandEvent& event ) override;
|
|
|
|
void OnDeleteField( wxCommandEvent& event ) override;
|
|
|
|
void OnMoveUp( wxCommandEvent& event ) override;
|
|
|
|
void OnMoveDown( wxCommandEvent& event ) override;
|
|
|
|
void OnSizeGrid( wxSizeEvent& event ) override;
|
|
|
|
void OnUpdateUI( wxUpdateUIEvent& event ) override;
|
|
|
|
|
|
|
|
void AdjustGridColumns( int aWidth );
|
2020-05-23 15:50:08 +00:00
|
|
|
|
|
|
|
bool TransferDataToWindow() override;
|
|
|
|
bool TransferDataFromWindow() override;
|
|
|
|
|
2021-10-12 20:05:37 +00:00
|
|
|
private:
|
|
|
|
SCH_EDIT_FRAME* m_Parent;
|
|
|
|
int m_width;
|
|
|
|
int m_delayedFocusRow;
|
|
|
|
int m_delayedFocusColumn;
|
|
|
|
|
|
|
|
SCH_LABEL_BASE* m_currentLabel;
|
|
|
|
wxTextEntry* m_activeTextEntry;
|
|
|
|
SCH_NETNAME_VALIDATOR m_netNameValidator;
|
|
|
|
|
|
|
|
FIELDS_GRID_TABLE<SCH_FIELD>* m_fields;
|
2023-04-13 12:45:22 +00:00
|
|
|
std::bitset<64> m_shownColumns;
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
UNIT_BINDER m_textSize;
|
2020-09-05 16:00:29 +00:00
|
|
|
|
2021-10-12 20:05:37 +00:00
|
|
|
HTML_MESSAGE_BOX* m_helpWindow;
|
2020-05-23 15:50:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-10-12 20:05:37 +00:00
|
|
|
#endif // DIALOG_LABEL_PROPERTIES_H
|