KiCad PCB EDA Suite
panel_libedit_display_options.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2017-2018 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #include <class_drawpanel.h>
21 #include <lib_edit_frame.h>
22 #include <view/view.h>
24 #include <widgets/paged_dialog.h>
25 
27 
28 
30  PAGED_DIALOG* aParent ) :
31  wxPanel( aParent->GetTreebook(), wxID_ANY ),
32  m_frame( aFrame )
33 {
34  auto mainSizer = new wxBoxSizer( wxHORIZONTAL );
35  SetSizer( mainSizer );
36 
37  // install GAL options pane
39 
40  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
41  mainSizer->Add( m_galOptsPanel, 1, wxEXPAND | wxLEFT, 5 );
42 
43  // a spacer to take up the other half of the width
44  auto spacer = new wxPanel( this, wxID_ANY );
45  mainSizer->Add( spacer, 1, wxEXPAND | wxLEFT, 5 );
46 }
47 
48 
50 {
52  return true;
53 }
54 
55 
57 {
59 
60  // refresh view
62  view->RecacheAllItems();
65 
66  return true;
67 }
PANEL_LIBEDIT_DISPLAY_OPTIONS(LIB_EDIT_FRAME *aParent, PAGED_DIALOG *aWindow)
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
Definition: draw_frame.h:946
void RecacheAllItems()
Function RecacheAllItems() Rebuilds GAL display lists.
Definition: view.cpp:1392
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...
KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
Auxiliary rendering target (noncached)
Definition: definitions.h:42
bool TransferDataToWindow() override
Load the panel controls from the given opt.
void MarkTargetDirty(int aTarget)
Function MarkTargetDirty() Sets or clears target &#39;dirty&#39; flag.
Definition: view.h:596
SCH_DRAW_PANEL * GetCanvas() const override
The symbol library editor main window.
Definition of class LIB_EDIT_FRAME.
EDA_DRAW_PANEL_GAL * GetGalCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
Definition: draw_frame.h:928
Class VIEW.
Definition: view.h:61
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.