Link to: header | other interface
directory
Copyright Turtle Creek Software 1996-2006. All Rights Reserved.
Comments
CTCS_EditorWindow
This class manages the editor windows in the
Goldenseal small business estimating software,
project management software, construction
estimating software
and construction software.
It's simply a window that contains an editor. We pass along messages to it.
SUPERCLASS = CTCS_Window
**************
CTCS_ReportWindow
a window that contains a report editor. We pass along messages to it.
SUPERCLASS = CTCS_Window
Constructor
/*********************************************************************************
constructor from stream
*********************************************************************************/
CTCS_EditorWindow::CTCS_EditorWindow(LStream *inStream)
: THE_SUPERCLASS(inStream)
{
mEditor = nil;
}
/*********************************************************************************
default constructor
*********************************************************************************/
CTCS_EditorWindow::CTCS_EditorWindow()
: THE_SUPERCLASS()
{
mEditor = nil;
}
/*********************************************************************************
param constructor
*********************************************************************************/
CTCS_EditorWindow::CTCS_EditorWindow(const SWindowInfo &inWindowInfo)
: THE_SUPERCLASS(inWindowInfo)
{
mEditor = nil;
}
/*********************************************************************************
param constructor
*********************************************************************************/
CTCS_EditorWindow::CTCS_EditorWindow(ResIDT inWINDid, UInt32 inAttributes, LCommander *inSuperCommander)
: THE_SUPERCLASS(inWINDid, inAttributes, inSuperCommander)
{
mEditor = nil;
}
Source Code
/*********************************************************************************
FinishCreateSelf TCS 11/17/00
finish creating the window. We fetch a reference to the enclosed editor
*********************************************************************************/
void CTCS_EditorWindow::FinishCreateSelf()
{
// fetch the enclosed editor
mEditor = TCS_SAFE_CAST(FindPaneByID(DB_Editor::class_ID), DB_Editor);
TCS_FailNILMsg(mEditor, TCS_GetErrString(errID_BadEditor));
// pass it along
THE_SUPERCLASS::FinishCreateSelf();
}
/*********************************************************************************
Activate
activate this window. We perform the inherited behaviour and then
notify the editor that it's been actived
*********************************************************************************/
void CTCS_EditorWindow::Activate()
{
THE_SUPERCLASS::Activate();
if (mEditor)
mEditor->HandleWindowActivate();
}
/*********************************************************************************
Deactivate TCS 3/21/02
deactivate this window. We perform the inherited behaviour and then
notify the editor that it's been deactived
*********************************************************************************/
void CTCS_EditorWindow::Deactivate()
{
THE_SUPERCLASS::Deactivate();
if (mEditor)
mEditor->HandleWindowDeactivate();
}
#if CAN_USE_MARK
#pragma mark -
#endif
/*********************************************************************************
constructor from stream TCS 12/3/03
*********************************************************************************/
CTCS_ReportWindow::CTCS_ReportWindow(LStream *inStream)
: THE_SUPERCLASS(inStream)
{
mEditor = nil;
}
/*********************************************************************************
default constructor TCS 12/3/03
*********************************************************************************/
CTCS_ReportWindow::CTCS_ReportWindow()
: THE_SUPERCLASS()
{
mEditor = nil;
}
#if CAN_USE_MARK
#pragma mark -
#endif
/*********************************************************************************
FinishCreateSelf TCS 12/3/03
finish creating the window. We fetch a reference to the enclosed editor
*********************************************************************************/
void CTCS_ReportWindow::FinishCreateSelf()
{
// fetch the enclosed editor
mEditor = TCS_SAFE_CAST(FindPaneByID(CReportEditor::class_ID), CReportEditor);
TCS_FailNILMsg(mEditor, TCS_GetErrString(errID_BadEditor));
// pass it along
THE_SUPERCLASS::FinishCreateSelf();
}
/*********************************************************************************
Activate TCS 12/3/03
activate this window. We perform the inherited behaviour and then
notify the editor that it's been actived
*********************************************************************************/
void CTCS_ReportWindow::Activate()
{
THE_SUPERCLASS::Activate();
if (mEditor)
mEditor->HandleWindowActivate();
}
/*********************************************************************************
Deactivate TCS 12/3/03
deactivate this window. We perform the inherited behaviour and then
notify the editor that it's been deactived
*********************************************************************************/
void CTCS_ReportWindow::Deactivate()
{
THE_SUPERCLASS::Deactivate();
if (mEditor)
mEditor->HandleWindowDeactivate();
}
|