summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2007-12-15 22:11:01 +0000
committerMatt Turner <mattst88@gmail.com>2007-12-15 22:11:01 +0000
commit73a5f11d23e07ce982a66ce5e24f5b3f8fea1a0f (patch)
treec7912789fc93219711a08f41c18879ef12593bda
parent00080b5afbeecffbf1ba8c05903247c95d23ecab (diff)
Add COPYING (BSD license). Whitespace changes.
git-svn-id: svn://mattst88.com/svn/calculator/trunk@3 40705d3a-cdd4-446d-8ced-669f9f7342eb
-rw-r--r--COPYING25
-rwxr-xr-xcalculator.cpp56
2 files changed, 55 insertions, 26 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..bce71b5
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,25 @@
+* Copyright (c) 2007, Matt Turner
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* * Neither the name of the <organization> nor the
+* names of its contributors may be used to endorse or promote products
+* derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/calculator.cpp b/calculator.cpp
index d8bae40..7124a06 100755
--- a/calculator.cpp
+++ b/calculator.cpp
@@ -3,53 +3,57 @@
using namespace SkyGI;
-class MyApp : public Application
-{
-public:
- MyApp(int argc, char *argv[]);
+class MyApp : public Application {
+ public:
+ MyApp(int argc, char *argv[]);
};
-class MyApplicationWindow : public ApplicationWindow
-{
-public:
- MyApplicationWindow(const Rect &rFrame, const String& szTitle, unsigned int nWindowLayoutFlags, unsigned int uiFlags = 0);
- void OnCommand(const MessageCommand *pMessage);
+class MyApplicationWindow : public ApplicationWindow {
+ public:
+ MyApplicationWindow( const Rect &rFrame,
+ const String& szTitle,
+ unsigned int nWindowLayoutFlags,
+ unsigned int uiFlags = 0);
+ void OnCommand( const MessageCommand *pMessage);
};
-MyApplicationWindow::MyApplicationWindow(const Rect &rFrame,
- const String& szTitle, unsigned int nWindowLayoutFlags, unsigned int uiFlags):
- ApplicationWindow(rFrame, szTitle, nWindowLayoutFlags)
+MyApplicationWindow::MyApplicationWindow( const Rect &rFrame,
+ const String& szTitle,
+ unsigned int nWindowLayoutFlags,
+ unsigned int uiFlags
+ ): ApplicationWindow(rFrame, szTitle, nWindowLayoutFlags)
{
}
-void MyApplicationWindow::OnCommand(const MessageCommand *pMessage)
-{
- switch (pMessage->GetID())
- {
- default:
- break;
+void MyApplicationWindow::OnCommand(const MessageCommand *pMessage) {
+ switch (pMessage->GetID()) {
+ default:
+ break;
}
}
-MyApp::MyApp(int argc, char* argv[]) : Application("application/x-vnd.Calculator", argc, argv)
-{
+MyApp::MyApp(int argc, char* argv[]):
+ Application("application/x-vnd.Calculator", argc, argv) {
+
Rect r(Point(100, 100), Point(400, 300));
- MyApplicationWindow* pApplicationWindow = new MyApplicationWindow(r, "Calculator", WINDOW_LAYOUT_NOTHING, APPLICATION_WINDOW_NO_VIEW);
+ MyApplicationWindow* pApplicationWindow =
+ new MyApplicationWindow(r, "Calculator", WINDOW_LAYOUT_NOTHING,
+ APPLICATION_WINDOW_NO_VIEW);
-// pApplicationWindow->AddStatusBar();
- pApplicationWindow->GetTitleWindow()->SetFlags( (TitleWindowFlags)(pApplicationWindow->GetTitleWindow()->GetFlags() ));
+ pApplicationWindow->GetTitleWindow()->SetFlags(
+ (TitleWindowFlags)(pApplicationWindow->GetTitleWindow()->GetFlags()
+ ));
pApplicationWindow->Show();
-
}
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
MyApp pApp(argc, argv);
return pApp.Run();
}
+