OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChildFrame Class Reference

#include <ChildFrame.hh>

Inheritance diagram for ChildFrame:
Inheritance graph
Collaboration diagram for ChildFrame:
Collaboration graph

Public Member Functions

 ChildFrame (wxDocument *doc, wxView *view, wxDocMDIParentFrame *parent)
 
 ~ChildFrame ()
 
void setStatus (const wxString text, int field=0)
 

Private Member Functions

void onFocus (wxFocusEvent &event)
 

Private Attributes

wxView * view_
 View of the document which is displayed in the frame. More...
 
wxDocMDIParentFrame * parent_
 MDI parent frame of the ChildFrame. More...
 

Detailed Description

MDI child frame for displaying a document.

Definition at line 42 of file ChildFrame.hh.

Constructor & Destructor Documentation

◆ ChildFrame()

ChildFrame::ChildFrame ( wxDocument *  doc,
wxView *  view,
wxDocMDIParentFrame *  parent 
)

The Constructor.

Parameters
docDocument which is displayed in the ChildFrame.
viewView of the document to display.
parentMDI parent frame of the child frame.

Definition at line 52 of file ChildFrame.cc.

55  :
56  wxDocMDIChildFrame(doc, view, parent, -1, _T("ChildFrame")),
57  view_(view), parent_(parent) {
58 
59 }

◆ ~ChildFrame()

ChildFrame::~ChildFrame ( )

The Destructor.

Definition at line 65 of file ChildFrame.cc.

65  {
66 }

Member Function Documentation

◆ onFocus()

void ChildFrame::onFocus ( wxFocusEvent &  event)
private

Activates the associated view when a ChildFrame instance gains focus.

Correct views are not always activated by the wxWidgets document/view framework when documents are closed. This function makes sure that the view associated with the focused ChildFrame is activated.

Definition at line 91 of file ChildFrame.cc.

91  {
92  view_->Activate(true);
93  event.Skip();
94 }

References view_.

◆ setStatus()

void ChildFrame::setStatus ( const wxString  text,
int  field = 0 
)

Sets the statusbar text.

Parameters
textNew text for the statusbar.
fieldField of status bar to set text for.

Definition at line 76 of file ChildFrame.cc.

76  {
77  wxStatusBar* statusbar = parent_->GetStatusBar();
78  if (statusbar != NULL && statusbar->GetFieldsCount() > field) {
79  statusbar->SetStatusText(text, field);
80  }
81 }

References parent_.

Referenced by SetStatusTextCmd::Do(), SelectTool::onMouseEvent(), MachineCanvas::updateMachine(), and ConnectTool::updateStatusline().

Member Data Documentation

◆ parent_

wxDocMDIParentFrame* ChildFrame::parent_
private

MDI parent frame of the ChildFrame.

Definition at line 55 of file ChildFrame.hh.

Referenced by setStatus().

◆ view_

wxView* ChildFrame::view_
private

View of the document which is displayed in the frame.

Definition at line 53 of file ChildFrame.hh.

Referenced by onFocus().


The documentation for this class was generated from the following files:
ChildFrame::view_
wxView * view_
View of the document which is displayed in the frame.
Definition: ChildFrame.hh:53
ChildFrame::parent_
wxDocMDIParentFrame * parent_
MDI parent frame of the ChildFrame.
Definition: ChildFrame.hh:55