KiCad PCB EDA Suite
Loading...
Searching...
No Matches
wx_panel.h
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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef WX_PANEL_H
21#define WX_PANEL_H
22
23#include <wx/panel.h>
24#include <gal/color4d.h>
25
26class WX_PANEL : public wxPanel
27{
28public:
29 WX_PANEL( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL,
31 const wxString& name = wxEmptyString );
32
33 ~WX_PANEL();
34
35 void SetBorders( bool aLeft, bool aRight, bool aTop, bool aBottom )
36 {
37 m_leftBorder = aLeft;
38 m_rightBorder = aRight;
39 m_topBorder = aTop;
40 m_bottomBorder = aBottom;
41 }
42
43 void SetBorderColor( const KIGFX::COLOR4D& aColor )
44 {
45 m_borderColor = aColor;
46 }
47
48private:
49 void OnPaint( wxPaintEvent& event );
50
51private:
56
58};
59
60
61#endif //WX_PANEL_H
const char * name
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
void SetBorders(bool aLeft, bool aRight, bool aTop, bool aBottom)
Definition wx_panel.h:35
bool m_topBorder
Definition wx_panel.h:54
bool m_rightBorder
Definition wx_panel.h:53
bool m_leftBorder
Definition wx_panel.h:52
bool m_bottomBorder
Definition wx_panel.h:55
WX_PANEL(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
Definition wx_panel.cpp:24
void SetBorderColor(const KIGFX::COLOR4D &aColor)
Definition wx_panel.h:43
void OnPaint(wxPaintEvent &event)
Definition wx_panel.cpp:43
KIGFX::COLOR4D m_borderColor
Definition wx_panel.h:57