-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,564 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#include "CBroadcastWindow.h" | ||
|
||
CBroadcastWindow::CBroadcastWindow() | ||
: LWindow::LWindow() | ||
, LBroadcaster::LBroadcaster() | ||
{ | ||
} | ||
|
||
CBroadcastWindow::CBroadcastWindow( const SWindowInfo& inWindowInfo ) | ||
: LWindow::LWindow(inWindowInfo) | ||
, LBroadcaster::LBroadcaster() | ||
{ | ||
} | ||
|
||
CBroadcastWindow::CBroadcastWindow( | ||
ResIDT inWINDid, | ||
UInt32 inAttributes, | ||
LCommander* inSuperCommander) | ||
: LWindow::LWindow(inWINDid, inAttributes, inSuperCommander) | ||
, LBroadcaster::LBroadcaster() | ||
{ | ||
} | ||
|
||
CBroadcastWindow::CBroadcastWindow( | ||
LCommander* inSuperCommander, | ||
const Rect& inGlobalBounds, | ||
ConstStringPtr inTitle, | ||
SInt16 inProcID, | ||
UInt32 inAttributes, | ||
WindowPtr inBehind) | ||
: LWindow::LWindow(inSuperCommander, inGlobalBounds, inTitle, inProcID, inAttributes, inBehind) | ||
, LBroadcaster::LBroadcaster() | ||
{ | ||
} | ||
|
||
CBroadcastWindow::CBroadcastWindow( LStream* inStream ) | ||
: LWindow::LWindow(inStream) | ||
, LBroadcaster::LBroadcaster() | ||
{ | ||
} | ||
|
||
Boolean | ||
CBroadcastWindow::ObeyCommand(CommandT inCommand, void* ioParam) { | ||
if(inCommand == cmd_Close) { | ||
BroadcastMessage(msg_WindowClosed, this); | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
CBroadcastWindow::~CBroadcastWindow() | ||
{ | ||
// Notify Listeners that the window is closing | ||
BroadcastMessage(msg_WindowClosed, this); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#ifndef _H_CBroadcastWindow | ||
#define _H_CBroadcastWindow | ||
#pragma once | ||
|
||
#include <LWindow.h> | ||
#include <LBroadcaster.h> | ||
|
||
const MessageT msg_WindowClosed = 210; // CBroadcastWindow* | ||
|
||
/// | ||
/// A Window that broadcasts events that occur to it | ||
/// | ||
class CBroadcastWindow : public LWindow, public LBroadcaster { | ||
|
||
public: | ||
// Bwin = Broadcast Window | ||
// Use at least one capital letter to avoid conflict with | ||
// CodeWarrior built in class ids | ||
enum { class_ID = FOUR_CHAR_CODE('Bwin') }; | ||
|
||
CBroadcastWindow(); | ||
|
||
CBroadcastWindow( const SWindowInfo& inWindowInfo ); | ||
|
||
CBroadcastWindow( | ||
ResIDT inWINDid, | ||
UInt32 inAttributes, | ||
LCommander* inSuperCommander); | ||
|
||
CBroadcastWindow( | ||
LCommander* inSuperCommander, | ||
const Rect& inGlobalBounds, | ||
ConstStringPtr inTitle, | ||
SInt16 inProcID, | ||
UInt32 inAttributes, | ||
WindowPtr inBehind); | ||
|
||
CBroadcastWindow( LStream* inStream ); | ||
|
||
// LCommander | ||
virtual Boolean ObeyCommand( | ||
CommandT inCommand, | ||
void* ioParam); | ||
|
||
|
||
virtual ~CBroadcastWindow(); | ||
|
||
|
||
protected: | ||
|
||
}; | ||
|
||
#endif // _H_CBroadcastWindow |
Oops, something went wrong.