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

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

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

Definition at line 770 of file footprint_wizard_frame.cpp.

771 {
772 }

Member Function Documentation

void FOOTPRINT_WIZARD_MESSAGES::ClearScreen ( )

Definition at line 795 of file footprint_wizard_frame.cpp.

References m_messageWindow.

Referenced by FOOTPRINT_WIZARD_FRAME::DisplayBuildMessage().

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

Definition at line 780 of file footprint_wizard_frame.cpp.

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

Definition at line 789 of file footprint_wizard_frame.cpp.

References m_messageWindow.

Referenced by FOOTPRINT_WIZARD_FRAME::DisplayBuildMessage().

790 {
791  m_messageWindow->SetValue( aMessage );
792 }
void FOOTPRINT_WIZARD_MESSAGES::SaveSettings ( )

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

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