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
1 parent
c53e365
commit d406727
Showing
7 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ App::App() | |
{ | ||
fMainWindow = new MainWindow(); | ||
fMainWindow->Show(); | ||
fMainWindow->Activate(); | ||
} | ||
|
||
void | ||
|
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
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,57 @@ | ||
/* | ||
* Copyright 2015 Your Name <your@email.address> | ||
* All rights reserved. Distributed under the terms of the MIT license. | ||
*/ | ||
|
||
|
||
#include "CategorySettingWindow.h" | ||
|
||
CategorySettingWindow::CategorySettingWindow(vector<BString> vCustomApps) | ||
: BWindow(BRect(),"Category Settings" | ||
,B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS ) { | ||
|
||
ResizeTo(400,400); | ||
CenterOnScreen(); | ||
buildLayout(vCustomApps); | ||
} | ||
void | ||
CategorySettingWindow::buildLayout(vector<BString> vCustomApps) { | ||
|
||
fCategoryMenu = new BPopUpMenu("Select Category.."); | ||
|
||
fCategoryMenu->AddItem(new BMenuItem("Appearance", | ||
new BMessage(kSetCategory))); | ||
fCategoryMenu->AddItem(new BMenuItem("Input/Output", | ||
new BMessage(kSetCategory))); | ||
fCategoryMenu->AddItem(new BMenuItem("Connectivity", | ||
new BMessage(kSetCategory))); | ||
fCategoryMenu->AddItem(new BMenuItem("System", | ||
new BMessage(kSetCategory))); | ||
fCategoryMenu->AddItem(new BMenuItem("Uncategorized", | ||
new BMessage(kSetCategory))); | ||
|
||
for(int i = 0; i<vCustomApps.size(); i++) { | ||
|
||
string* str = new string(vCustomApps[i]); | ||
*str += string(": "); | ||
CategoryField = new BMenuField("Category", | ||
str->c_str(), fCategoryMenu); | ||
CategoryField->SetAlignment(B_ALIGN_RIGHT); | ||
} | ||
|
||
BButton* bUpdate = new BButton("Apply Changes"); | ||
|
||
fWindowView = new BView("Main Window View", 0); | ||
BLayoutBuilder::Group<>(fWindowView, B_VERTICAL) | ||
.SetInsets(B_USE_DEFAULT_SPACING) | ||
.AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING) | ||
.Add(CategoryField) | ||
.End() | ||
.Add(bUpdate) | ||
.End(); | ||
|
||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0) | ||
.Add(fWindowView) | ||
.End(); | ||
} | ||
|
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,28 @@ | ||
/* | ||
* Copyright 2015 Your Name <your@email.address> | ||
* All rights reserved. Distributed under the terms of the MIT license. | ||
*/ | ||
#ifndef CATEGORYSETTINGWINDOW_H | ||
#define CATEGORYSETTINGWINDOW_H | ||
|
||
|
||
#include <Window.h> | ||
#include "MainWindow.h" | ||
|
||
class CategorySettingWindow: public BWindow { | ||
|
||
static const uint32 kSetCategory = 'mnpl'; | ||
|
||
public: | ||
CategorySettingWindow(vector<BString> vCustomApps); | ||
void buildLayout(vector<BString> vCustomApps); | ||
private: | ||
BView* fWindowView; | ||
BPopUpMenu* fCategoryMenu; | ||
BMenuField* CategoryField; | ||
|
||
|
||
}; | ||
|
||
|
||
#endif // CATEGORYSETTINGWINDOW_H |
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
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
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
d406727
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom Categories Panel - WIP