| 
    KiCad PCB EDA Suite
    
   | 
 
#include <symbol_preview_widget.h>
  
Public Member Functions | |
| SYMBOL_PREVIEW_WIDGET (wxWindow *aParent, KIWAY *aKiway, bool aIncludeStatus, EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) | |
| Construct a symbol preview widget.   | |
| ~SYMBOL_PREVIEW_WIDGET () override | |
| void | SetStatusText (const wxString &aText) | 
| Set the contents of the status label and display it.   | |
| void | DisplaySymbol (const LIB_ID &aSymbolID, int aUnit, int aBodyStyle=0) | 
| Set the currently displayed symbol.   | |
| void | DisplayPart (LIB_SYMBOL *aSymbol, int aUnit, int aBodyStyle=0) | 
| EDA_DRAW_PANEL_GAL * | GetCanvas () const | 
| SCH_RENDER_SETTINGS * | GetRenderSettings () | 
Protected Member Functions | |
| void | onSize (wxSizeEvent &aEvent) | 
| void | fitOnDrawArea () | 
Protected Attributes | |
| KIWAY * | m_kiway | 
| GAL_DISPLAY_OPTIONS_IMPL | m_galDisplayOptions | 
| EDA_DRAW_PANEL_GAL * | m_preview | 
| wxStaticText * | m_status | 
| wxPanel * | m_statusPanel | 
| wxSizer * | m_statusSizer | 
| wxSizer * | m_outerSizer | 
| LIB_SYMBOL * | m_previewItem | 
| A local copy of the LIB_SYMBOL to display on the canvas.   | |
| SCH_RENDER_SETTINGS * | m_renderSettings | 
| BOX2I | m_itemBBox | 
| The bounding box of the current item.   | |
Definition at line 36 of file symbol_preview_widget.h.
| SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET | ( | wxWindow * | aParent, | 
| KIWAY * | aKiway, | ||
| bool | aIncludeStatus, | ||
| EDA_DRAW_PANEL_GAL::GAL_TYPE | aCanvasType ) | 
Construct a symbol preview widget.
| aParent | - parent window | 
| aKiway | - an active Kiway instance | 
| aCanvasType | = the type of canvas (GAL_TYPE_OPENGL or GAL_TYPE_CAIRO only) | 
Definition at line 38 of file symbol_preview_widget.cpp.
References DEFAULT_THEME, EDA_DRAW_PANEL_GAL::GAL_FALLBACK, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, GetAppSettings(), GetColorSettings(), PGM_BASE::GetCommonSettings(), KIGFX::VIEW::GetPainter(), LAYER_REFERENCEPART, APP_SETTINGS_BASE::m_ColorTheme, m_galDisplayOptions, m_kiway, EESCHEMA_SETTINGS::m_LibViewPanel, m_outerSizer, m_preview, m_previewItem, m_renderSettings, m_status, m_statusPanel, m_statusSizer, APP_SETTINGS_BASE::m_Window, onSize(), Pgm(), EESCHEMA_SETTINGS::PANEL_LIB_VIEW::show_pin_electrical_type, EESCHEMA_SETTINGS::PANEL_LIB_VIEW::show_pin_numbers, and KIGFX::COLOR4D::ToColour().
Referenced by SYMBOL_DIFF_WIDGET::SYMBOL_DIFF_WIDGET().
      
  | 
  override | 
Definition at line 132 of file symbol_preview_widget.cpp.
References m_preview, and m_previewItem.
| void SYMBOL_PREVIEW_WIDGET::DisplayPart | ( | LIB_SYMBOL * | aSymbol, | 
| int | aUnit, | ||
| int | aBodyStyle = 0 ) | 
Definition at line 259 of file symbol_preview_widget.cpp.
References KIGFX::VIEW::Add(), AUTOPLACE_AUTO, fitOnDrawArea(), GetAppSettings(), m_itemBBox, m_preview, m_previewItem, m_renderSettings, m_statusPanel, and KIGFX::VIEW::Remove().
| void SYMBOL_PREVIEW_WIDGET::DisplaySymbol | ( | const LIB_ID & | aSymbolID, | 
| int | aUnit, | ||
| int | aBodyStyle = 0 ) | 
Set the currently displayed symbol.
Definition at line 188 of file symbol_preview_widget.cpp.
References _, KIGFX::VIEW::Add(), AUTOPLACE_AUTO, fitOnDrawArea(), LIB_SYMBOL::Flatten(), GetAppSettings(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_itemBBox, m_kiway, m_preview, m_previewItem, m_renderSettings, m_statusPanel, KIGFX::VIEW::Remove(), PROJECT_SCH::SymbolLibAdapter(), IO_ERROR::What(), and UTF8::wx_str().
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
      
  | 
  protected | 
Definition at line 164 of file symbol_preview_widget.cpp.
References m_itemBBox, m_preview, m_previewItem, scale, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), ToVECTOR2D(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SYMBOL_DIFF_WIDGET::DisplayDiff(), DisplayPart(), DisplaySymbol(), and onSize().
      
  | 
  inline | 
Definition at line 64 of file symbol_preview_widget.h.
References m_preview.
      
  | 
  inline | 
Definition at line 66 of file symbol_preview_widget.h.
References m_renderSettings.
      
  | 
  protected | 
Definition at line 152 of file symbol_preview_widget.cpp.
References fitOnDrawArea(), m_preview, and m_previewItem.
Referenced by SYMBOL_PREVIEW_WIDGET().
| void SYMBOL_PREVIEW_WIDGET::SetStatusText | ( | const wxString & | aText | ) | 
Set the contents of the status label and display it.
Definition at line 141 of file symbol_preview_widget.cpp.
References m_preview, m_status, and m_statusPanel.
      
  | 
  protected | 
Definition at line 75 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
The bounding box of the current item.
Definition at line 90 of file symbol_preview_widget.h.
Referenced by SYMBOL_DIFF_WIDGET::DisplayDiff(), DisplayPart(), DisplaySymbol(), and fitOnDrawArea().
      
  | 
  protected | 
Definition at line 73 of file symbol_preview_widget.h.
Referenced by DisplaySymbol(), and SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
Definition at line 81 of file symbol_preview_widget.h.
Referenced by SYMBOL_DIFF_WIDGET::SYMBOL_DIFF_WIDGET(), and SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
Definition at line 76 of file symbol_preview_widget.h.
Referenced by SYMBOL_DIFF_WIDGET::DisplayDiff(), DisplayPart(), DisplaySymbol(), fitOnDrawArea(), GetCanvas(), onSize(), SYMBOL_DIFF_WIDGET::onSlider(), SetStatusText(), SYMBOL_PREVIEW_WIDGET(), and ~SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
A local copy of the LIB_SYMBOL to display on the canvas.
Definition at line 86 of file symbol_preview_widget.h.
Referenced by SYMBOL_DIFF_WIDGET::DisplayDiff(), DisplayPart(), DisplaySymbol(), fitOnDrawArea(), onSize(), SYMBOL_DIFF_WIDGET::onSlider(), SYMBOL_PREVIEW_WIDGET(), and ~SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
Definition at line 87 of file symbol_preview_widget.h.
Referenced by DisplayPart(), DisplaySymbol(), GetRenderSettings(), and SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
Definition at line 78 of file symbol_preview_widget.h.
Referenced by SetStatusText(), and SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
Definition at line 79 of file symbol_preview_widget.h.
Referenced by DisplayPart(), DisplaySymbol(), SetStatusText(), and SYMBOL_PREVIEW_WIDGET().
      
  | 
  protected | 
Definition at line 80 of file symbol_preview_widget.h.
Referenced by SYMBOL_PREVIEW_WIDGET().