KiCad PCB EDA Suite
FOOTPRINT_WIZARD_MESSAGES Class Reference

#include <footprint_wizard_frame.h>

Inheritance diagram for FOOTPRINT_WIZARD_MESSAGES:

Public Member Functions

 FOOTPRINT_WIZARD_MESSAGES (FOOTPRINT_WIZARD_FRAME *aParent, wxConfigBase *aCfg)
 
 ~FOOTPRINT_WIZARD_MESSAGES ()
 
void PrintMessage (const wxString &aMessage)
 
void ClearScreen ()
 
void SaveSettings ()
 
void LoadSettings ()
 

Private Member Functions

void OnCloseMsgWindow (wxCloseEvent &aEvent)
 

Private Attributes

wxTextCtrl * m_messageWindow
 
wxPoint m_position
 
wxSize m_size
 
wxConfigBase * m_config
 
bool m_canClose
 

Detailed Description

Definition at line 226 of file footprint_wizard_frame.h.

Constructor & Destructor Documentation

FOOTPRINT_WIZARD_MESSAGES::FOOTPRINT_WIZARD_MESSAGES ( FOOTPRINT_WIZARD_FRAME aParent,
wxConfigBase *  aCfg 
)

Definition at line 740 of file footprint_wizard_frame.cpp.

References LoadSettings(), m_canClose, m_config, m_messageWindow, m_position, m_size, wxPoint::x, and wxPoint::y.

740  :
741  wxMiniFrame( aParent, wxID_ANY, _( "Footprint Builder Messages" ),
742  wxDefaultPosition, wxDefaultSize,
743  wxCAPTION | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT )
744 {
745  m_canClose = false;
746  wxBoxSizer* bSizer = new wxBoxSizer( wxVERTICAL );
747  SetSizer( bSizer );
748 
749  m_messageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString,
750  wxDefaultPosition, wxDefaultSize,
751  wxTE_MULTILINE|wxTE_READONLY );
752  bSizer->Add( m_messageWindow, 1, wxEXPAND, 0 );
753 
754  m_config = aCfg;
755 
756  LoadSettings();
757 
758  SetSize( m_position.x, m_position.y, m_size.x, m_size.y );
759 
760  m_messageWindow->SetMinSize( wxSize( 350, 250 ) );
761  Layout();
762 
763  bSizer->SetSizeHints( this );
764 }
FOOTPRINT_WIZARD_MESSAGES::~FOOTPRINT_WIZARD_MESSAGES ( )

Definition at line 767 of file footprint_wizard_frame.cpp.

768 {
769 }

Member Function Documentation

void FOOTPRINT_WIZARD_MESSAGES::ClearScreen ( )

Definition at line 792 of file footprint_wizard_frame.cpp.

References m_messageWindow.

Referenced by FOOTPRINT_WIZARD_FRAME::DisplayBuildMessage().

793 {
794  m_messageWindow->Clear();
795 }
void FOOTPRINT_WIZARD_MESSAGES::LoadSettings ( )
void FOOTPRINT_WIZARD_MESSAGES::OnCloseMsgWindow ( wxCloseEvent &  aEvent)
private

Definition at line 777 of file footprint_wizard_frame.cpp.

778 {
779  if( !m_canClose )
780  aEvent.Veto();
781  else
782  aEvent.Skip();
783 }
void FOOTPRINT_WIZARD_MESSAGES::PrintMessage ( const wxString &  aMessage)

Definition at line 786 of file footprint_wizard_frame.cpp.

References m_messageWindow.

Referenced by FOOTPRINT_WIZARD_FRAME::DisplayBuildMessage().

787 {
788  m_messageWindow->SetValue( aMessage );
789 }
void FOOTPRINT_WIZARD_MESSAGES::SaveSettings ( )

Definition at line 803 of file footprint_wizard_frame.cpp.

References m_canClose, m_config, m_position, m_size, MESSAGE_BOX_POSX_KEY, MESSAGE_BOX_POSY_KEY, MESSAGE_BOX_SIZEX_KEY, MESSAGE_BOX_SIZEY_KEY, wxPoint::x, and wxPoint::y.

Referenced by FOOTPRINT_WIZARD_FRAME::OnCloseWindow().

804 {
805  if( !IsIconized() )
806  {
807  m_position = GetPosition();
808  m_size = GetSize();
809  }
810 
815 
816  m_canClose = false; // close event now allowed
817 }
#define MESSAGE_BOX_POSX_KEY
#define MESSAGE_BOX_SIZEX_KEY
#define MESSAGE_BOX_SIZEY_KEY
#define MESSAGE_BOX_POSY_KEY

Member Data Documentation

bool FOOTPRINT_WIZARD_MESSAGES::m_canClose
private

Definition at line 241 of file footprint_wizard_frame.h.

Referenced by FOOTPRINT_WIZARD_MESSAGES(), and SaveSettings().

wxConfigBase* FOOTPRINT_WIZARD_MESSAGES::m_config
private

Definition at line 240 of file footprint_wizard_frame.h.

Referenced by FOOTPRINT_WIZARD_MESSAGES(), LoadSettings(), and SaveSettings().

wxTextCtrl* FOOTPRINT_WIZARD_MESSAGES::m_messageWindow
private

Definition at line 237 of file footprint_wizard_frame.h.

Referenced by ClearScreen(), FOOTPRINT_WIZARD_MESSAGES(), and PrintMessage().

wxPoint FOOTPRINT_WIZARD_MESSAGES::m_position
private

Definition at line 238 of file footprint_wizard_frame.h.

Referenced by FOOTPRINT_WIZARD_MESSAGES(), LoadSettings(), and SaveSettings().

wxSize FOOTPRINT_WIZARD_MESSAGES::m_size
private

Definition at line 239 of file footprint_wizard_frame.h.

Referenced by FOOTPRINT_WIZARD_MESSAGES(), LoadSettings(), and SaveSettings().


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