7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-24 00:34:47 +00:00
kicad/eeschema/dialogs/panel_eeschema_display_options_base.h
John Beard 91dca89116 Eeschema: Add indicator icons for pins with alt modes
This makes it easier to see which pins have alt modes
available. There is an option to turn them off.

The icon positions are chosen so they they shouldn't
interfere as far as possible:

* If the text is inside, the icon goes more inside
  the body
* If the text is above/below the pin, it goes away from
  the body

This means it won't collide with a symbol wall in
most cases, but some symbols with alt pins on opposing
sides may need to be widened if the icons are show.

Includes a rather fiddly refactor of the SCH_PIN painter
function, which needs quite a lot of massaging to allow
it to figure out where an icon would go. Quite a bit
of logic is broken out into smaller encapsulations with
less visible state to each chunk.

Icon modes for base-name-selected and alt-selected are
included, but only the former works due to information
being thrown away during the SCH_PAINTER tempPin
process.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11069
2024-10-08 23:30:50 +08:00

84 lines
2.7 KiB
C++

///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class FONT_CHOICE;
#include "widgets/resettable_panel.h"
#include <wx/sizer.h>
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/spinctrl.h>
#include <wx/gbsizer.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL
{
private:
protected:
wxBoxSizer* m_galOptionsSizer;
wxStaticText* m_appearanceLabel;
wxStaticLine* m_staticline1;
wxStaticText* m_defaultFontLabel;
FONT_CHOICE* m_defaultFontCtrl;
wxCheckBox* m_checkShowHiddenPins;
wxCheckBox* m_checkShowHiddenFields;
wxCheckBox* m_checkShowERCErrors;
wxCheckBox* m_checkShowERCWarnings;
wxCheckBox* m_checkShowERCExclusions;
wxCheckBox* m_cbMarkSimExclusions;
wxCheckBox* m_checkShowOPVoltages;
wxCheckBox* m_checkShowOPCurrents;
wxCheckBox* m_checkShowPinAltModeIcons;
wxCheckBox* m_checkPageLimits;
wxStaticText* m_selectionLabel;
wxStaticLine* m_staticline2;
wxCheckBox* m_checkSelDrawChildItems;
wxCheckBox* m_checkSelFillShapes;
wxStaticText* m_selWidthLabel;
wxSpinCtrlDouble* m_selWidthCtrl;
wxStaticText* m_highlightColorNote;
wxStaticText* m_highlightWidthLabel;
wxSpinCtrlDouble* m_highlightWidthCtrl;
wxCheckBox* m_highlightNetclassColors;
wxStaticText* m_colorHighlightLabel;
wxSpinCtrlDouble* m_colHighlightThickness;
wxStaticText* m_colHighlightLabel2;
wxSpinCtrlDouble* m_colHighlightTransparency;
wxStaticText* m_crossprobeLabel;
wxStaticLine* m_staticline3;
wxCheckBox* m_checkCrossProbeOnSelection;
wxCheckBox* m_checkCrossProbeCenter;
wxCheckBox* m_checkCrossProbeZoom;
wxCheckBox* m_checkCrossProbeAutoHighlight;
public:
PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE();
};