KiCad PCB EDA Suite
wx_status_popup.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) 2014-2015 CERN
5  * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #include <wx_status_popup.h>
30 #include <wxPcbStruct.h>
31 
33  wxPopupWindow( aParent )
34 {
35  m_panel = new wxPanel( this, wxID_ANY );
36  m_panel->SetBackgroundColour( *wxLIGHT_GREY );
37 
38  m_topSizer = new wxBoxSizer( wxVERTICAL );
39  m_panel->SetSizer( m_topSizer );
40 }
41 
42 
44 {
45  m_topSizer->Fit( m_panel );
46  SetClientSize( m_panel->GetSize() );
47 }
48 
49 
51 {
52 }
53 
54 
55 void WX_STATUS_POPUP::Popup( wxWindow* )
56 {
57  Show( true );
58  Raise();
59 }
60 
61 
62 void WX_STATUS_POPUP::Move( const wxPoint& aWhere )
63 {
64  SetPosition ( aWhere );
65 }
wxBoxSizer * m_topSizer
virtual void Move(const wxPoint &aWhere)
void SetPosition(wxString aStr, wxString aDefaultMeasurementUnit, int *aX, int *aY, wxString aActualConversion)
virtual void Popup(wxWindow *aFocus=NULL)
WX_STATUS_POPUP(PCB_EDIT_FRAME *aParent)
Transient mouse following popup window implementation.
virtual ~WX_STATUS_POPUP()