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 745 of file footprint_wizard_frame.cpp.

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

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

Definition at line 772 of file footprint_wizard_frame.cpp.

773 {
774 }

Member Function Documentation

void FOOTPRINT_WIZARD_MESSAGES::ClearScreen ( )

Definition at line 797 of file footprint_wizard_frame.cpp.

References m_messageWindow.

Referenced by FOOTPRINT_WIZARD_FRAME::DisplayBuildMessage().

798 {
799  m_messageWindow->Clear();
800 }
void FOOTPRINT_WIZARD_MESSAGES::LoadSettings ( )
void FOOTPRINT_WIZARD_MESSAGES::OnCloseMsgWindow ( wxCloseEvent &  aEvent)
private

Definition at line 782 of file footprint_wizard_frame.cpp.

783 {
784  if( !m_canClose )
785  aEvent.Veto();
786  else
787  aEvent.Skip();
788 }
void FOOTPRINT_WIZARD_MESSAGES::PrintMessage ( const wxString &  aMessage)

Definition at line 791 of file footprint_wizard_frame.cpp.

References m_messageWindow.

Referenced by FOOTPRINT_WIZARD_FRAME::DisplayBuildMessage().

792 {
793  m_messageWindow->SetValue( aMessage );
794 }
void FOOTPRINT_WIZARD_MESSAGES::SaveSettings ( )

Definition at line 808 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().

809 {
810  if( !IsIconized() )
811  {
812  m_position = GetPosition();
813  m_size = GetSize();
814  }
815 
820 
821  m_canClose = false; // close event now allowed
822 }
#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: