-
Notifications
You must be signed in to change notification settings - Fork 1
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
896 changed files
with
94,316 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,62 @@ | ||
#include "MTestApp.h" | ||
#include <framework/io/MIoException.h> | ||
#include <framework/io/MLogger.h> | ||
#include <framework/resource/MResourceManager.h> | ||
#include <framework/treedocument/MTreeDocumentUtils.h> | ||
|
||
MTestApp::MTestApp() : | ||
ivPtWindow( 0 ) | ||
{ | ||
} | ||
|
||
MTestApp::~MTestApp() | ||
{ | ||
} | ||
|
||
MApp* createApp() | ||
{ | ||
return new MTestApp(); | ||
} | ||
|
||
|
||
bool MTestApp::onInit() | ||
{ | ||
#ifndef _DEBUG | ||
String appDir = getAppDir(); | ||
#else | ||
String appDir = "D:/code/msynth/msynth/"; | ||
#endif | ||
appDir.Replace( "\\", "/" ); | ||
|
||
try | ||
{ | ||
MResourceManager::getInstance()->loadArchive( appDir, "app" ); | ||
MResourceManager::getInstance()->loadArchive( appDir + "resource", "resource" ); | ||
} | ||
catch( MIoException ae ) | ||
{ | ||
MLogger::logError( ae.getExceptionDescripton() ); | ||
return false; | ||
} | ||
|
||
ivPtWindow = new MTestWindow(); | ||
ivPtWindow->create( MRect( 10,10, 640, 480 ), 0 ); | ||
ivPtWindow->setText( "MRoc widget systems" ); | ||
|
||
return true; | ||
} | ||
|
||
/** invoked when app exists */ | ||
bool MTestApp::onExit() | ||
{ | ||
try | ||
{ | ||
MResourceManager::release(); | ||
} | ||
catch( MIoException ae ) | ||
{ | ||
MLogger::logWarning( ae.getExceptionDescripton() ); | ||
return false; | ||
} | ||
return true; | ||
} |
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,33 @@ | ||
#ifndef __MTestApp | ||
#define __MTestApp | ||
|
||
#include <gui\MApp.h> | ||
#include "MTestWindow.h" | ||
|
||
class MTestApp : | ||
public MApp | ||
{ | ||
protected: | ||
|
||
/** the test window */ | ||
MTestWindow* ivPtWindow; | ||
|
||
public: | ||
|
||
/** constructor */ | ||
MTestApp(); | ||
|
||
/** destructor */ | ||
virtual ~MTestApp(); | ||
|
||
/** invoked when app is coming up */ | ||
virtual bool onInit(); | ||
|
||
/** invoked when app exists */ | ||
virtual bool onExit(); | ||
|
||
/** returns the application's name */ | ||
virtual String getAppName(){ return "MTestApp"; }; | ||
}; | ||
|
||
#endif |
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,47 @@ | ||
#include "MTestDialog.h" | ||
#include <framework/io/MLogger.h> | ||
|
||
/** constructor */ | ||
MTestDialog::MTestDialog() : | ||
ivPtButton( 0 ) | ||
{ | ||
ivPtButton = | ||
new MButton( | ||
"open new modal", | ||
MColorMap::create( 32, 32, 64 ), | ||
MColorMap::create( 64, 64, 64 ), | ||
MColorMap::create( 180, 180, 210 ) ); | ||
ivPtButton->setRect( MRect( 10, 10, 170, 20 ) ); | ||
ivPtButton->addActionListener( this ); | ||
addChild( ivPtButton ); | ||
|
||
if( create( MRect( 100, 100, 200, 200 ), 0 ) == false ) | ||
MLogger::logError( "MTestDialog::create failed" ); | ||
|
||
setText( "MTestDialog" ); | ||
|
||
doModal(); | ||
} | ||
|
||
/** destructor */ | ||
MTestDialog::~MTestDialog() | ||
{ | ||
ivPtButton->removeActionListener( this ); | ||
} | ||
|
||
/** invoked when button was pressed */ | ||
void MTestDialog::onActionPerformed( void* ptSrc ) | ||
{ | ||
MTestDialog dlg; | ||
} | ||
|
||
/** query interface */ | ||
void* MTestDialog::getInterface( const String& className ) const | ||
{ | ||
if( className == "MTestDialog" ) | ||
return (void*) ((MTestDialog*)this); | ||
else if( className == "IActionListener" ) | ||
return (void*) ((IActionListener*)this); | ||
else | ||
return MDialog::getInterface( className ); | ||
} |
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,31 @@ | ||
#ifndef __MTestDialog | ||
#define __MTestDialog | ||
|
||
#include <gui/dialog/MDialog.h> | ||
#include <gui/button/MButton.h> | ||
|
||
class MTestDialog : | ||
public MDialog, | ||
public IActionListener | ||
{ | ||
protected: | ||
|
||
/** the button which opens a new testdialog */ | ||
MButton* ivPtButton; | ||
|
||
public: | ||
|
||
/** constructor */ | ||
MTestDialog(); | ||
|
||
/** destructor */ | ||
virtual ~MTestDialog(); | ||
|
||
/** invoked when button was pressed */ | ||
virtual void onActionPerformed( void* ptSrc ); | ||
|
||
/** query interface */ | ||
virtual void* getInterface( const String& className ) const; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.