New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated the Vandelay application. #1
Merged
waddlesplash
merged 10 commits into
HaikuArchives:master
from
AkshayAgarwal007:gui-work
Mar 19, 2017
+544
−432
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
501503b
remove BeIDE .proj file
AkshayAgarwal007 4374002
Updated to use layout API and minor GUI work
AkshayAgarwal007 e2ddf37
Renamed constant and minor bug fix
AkshayAgarwal007 bbee12f
Added Makefile, gitignore and rdef file
AkshayAgarwal007 b56b345
Added clear fields functionality
AkshayAgarwal007 ce9e617
Added compute button and updated message ids
AkshayAgarwal007 c05e35c
Renamed first menu from 'File' to 'App'
AkshayAgarwal007 9f67bf7
Set flags to adjust size based on layout constraints
AkshayAgarwal007 9394038
Added TODO file
AkshayAgarwal007 b358afc
Use Haiku coding style
AkshayAgarwal007 File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Updated to use layout API and minor GUI work
- Loading branch information
| @@ -1,26 +1,45 @@ | ||
| #include "VandelayWindow.h" | ||
|
|
||
| #include "Vandelay.h" | ||
|
|
||
| const char * kSignature = "application/x-vnd.Blum-Vandelay"; | ||
|
|
||
| int main(int, char**) | ||
| { | ||
| VandelayApp VanApp; | ||
|
|
||
| VanApp.Run(); | ||
|
|
||
| return(0); | ||
| VandelayApp::VandelayApp() : BApplication(kSignature) { | ||
|
|
||
|
|
||
AkshayAgarwal007
Author
Contributor
|
||
| VanWindow = new VandelayWindow(); | ||
|
|
||
| // make window visible | ||
| VanWindow->Show(); | ||
| } | ||
|
|
||
| VandelayApp::VandelayApp() | ||
| : BApplication("application/x-vnd.Blum-Vandelay") | ||
| void | ||
| VandelayApp::AboutRequested() | ||
| { | ||
| VandelayWindow *VanWindow; | ||
| BRect WindowRect; | ||
| BAlert *alert = new BAlert("about", | ||
| "VanDelay v1.0\n" | ||
| "\tby David Blumberg,\n" | ||
| "\tdavidblumberg@linux.se\n" | ||
| "\tCopyright 200?\n\n" | ||
| "Convert between units and all kinds of\n" | ||
| "measurements with ease.", | ||
| "Thank you" | ||
| ); | ||
|
|
||
| // Set up a rectangle and make a new window | ||
| WindowRect.Set(100, 100, 400, 300); | ||
| VanWindow = new VandelayWindow(WindowRect); | ||
|
|
||
| // make window visible | ||
| VanWindow->Show(); | ||
| } | ||
| BTextView *view = alert->TextView(); | ||
| BFont font; | ||
| view->SetStylable(true); | ||
| view->GetFont(&font); | ||
| font.SetSize(font.Size() + 4); | ||
| font.SetFace(B_BOLD_FACE); | ||
| view->SetFontAndColor(0, 11, &font); | ||
| alert->Go(); | ||
| } | ||
|
|
||
|
|
||
| int main() { | ||
|
|
||
| VandelayApp VanApp; | ||
| VanApp.Run(); | ||
| return 0; | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Extra and unnecessary spaces at beginning of function. Also please conform to Haiku coding style (https://www.haiku-os.org/development/coding-guidelines/) as much as possible re. function formatting.