KiCad PCB EDA Suite
PANEL_DISPLAY_OPTIONS Class Reference

#include <panel_display_options.h>

Inheritance diagram for PANEL_DISPLAY_OPTIONS:

Public Member Functions

 PANEL_DISPLAY_OPTIONS (EDA_DRAW_FRAME *aParent, PAGED_DIALOG *aWindow)
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

EDA_DRAW_FRAMEm_frame
 
GAL_OPTIONS_PANELm_galOptsPanel
 

Detailed Description

Definition at line 30 of file panel_display_options.h.

Constructor & Destructor Documentation

◆ PANEL_DISPLAY_OPTIONS()

PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS ( EDA_DRAW_FRAME aParent,
PAGED_DIALOG aWindow 
)

Definition at line 28 of file panel_display_options.cpp.

28  :
29  wxPanel( aParent->GetTreebook(), wxID_ANY ),
30  m_frame( aFrame )
31 {
32  auto mainSizer = new wxBoxSizer( wxHORIZONTAL );
33  SetSizer( mainSizer );
34 
35  // install GAL options pane
37 
38  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
39  mainSizer->Add( m_galOptsPanel, 1, wxEXPAND | wxLEFT, 5 );
40 
41  // a spacer to take up the other half of the width
42  auto spacer = new wxPanel( this, wxID_ANY );
43  mainSizer->Add( spacer, 1, wxEXPAND | wxLEFT, 5 );
44 }
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
GAL_OPTIONS_PANEL * m_galOptsPanel

References EDA_DRAW_FRAME::GetGalDisplayOptions(), m_frame, and m_galOptsPanel.

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_DISPLAY_OPTIONS::TransferDataFromWindow ( )
overrideprivate

Definition at line 54 of file panel_display_options.cpp.

55 {
57 
58  // refresh view
59  KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
60  view->RecacheAllItems();
63 
64  return true;
65 }
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
void RecacheAllItems()
Function RecacheAllItems() Rebuilds GAL display lists.
Definition: view.cpp:1402
Auxiliary rendering target (noncached)
Definition: definitions.h:49
GAL_OPTIONS_PANEL * m_galOptsPanel
void MarkTargetDirty(int aTarget)
Function MarkTargetDirty() Sets or clears target 'dirty' flag.
Definition: view.h:585
virtual KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
Class VIEW.
Definition: view.h:61
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References EDA_DRAW_FRAME::GetCanvas(), EDA_DRAW_PANEL_GAL::GetView(), m_frame, m_galOptsPanel, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW::RecacheAllItems(), EDA_DRAW_PANEL_GAL::Refresh(), KIGFX::TARGET_NONCACHED, and GAL_OPTIONS_PANEL::TransferDataFromWindow().

◆ TransferDataToWindow()

bool PANEL_DISPLAY_OPTIONS::TransferDataToWindow ( )
overrideprivate

Definition at line 47 of file panel_display_options.cpp.

48 {
50  return true;
51 }
GAL_OPTIONS_PANEL * m_galOptsPanel
bool TransferDataToWindow() override
Load the panel controls from the given opt.

References m_galOptsPanel, and GAL_OPTIONS_PANEL::TransferDataToWindow().

Member Data Documentation

◆ m_frame

EDA_DRAW_FRAME* PANEL_DISPLAY_OPTIONS::m_frame
private

Definition at line 39 of file panel_display_options.h.

Referenced by PANEL_DISPLAY_OPTIONS(), and TransferDataFromWindow().

◆ m_galOptsPanel

GAL_OPTIONS_PANEL* PANEL_DISPLAY_OPTIONS::m_galOptsPanel
private

The documentation for this class was generated from the following files: