bit by bit building the Application Type window
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4308 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
#include <AppTypeAppFlagsView.h>
|
||||||
|
|
||||||
|
AppTypeAppFlagsView::AppTypeAppFlagsView(BRect viewFrame)
|
||||||
|
: BView(viewFrame, "AppTypeAppFlagsView", B_FOLLOW_ALL,
|
||||||
|
B_FRAME_EVENTS|B_WILL_DRAW)
|
||||||
|
{
|
||||||
|
SetViewColor( ui_color(B_PANEL_BACKGROUND_COLOR) );
|
||||||
|
|
||||||
|
BRect appFlagsBoxFrame = Bounds();
|
||||||
|
fAppFlagsBox = new BBox(appFlagsBoxFrame,"box",
|
||||||
|
B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP);
|
||||||
|
AddChild(fAppFlagsBox);
|
||||||
|
|
||||||
|
const char * appFlagsCheckBoxLabel = "Application Flags";
|
||||||
|
float appFlagsCheckBoxStringWidth = StringWidth(appFlagsCheckBoxLabel);
|
||||||
|
fAppFlagsCheckBox = new BCheckBox(appFlagsBoxFrame,
|
||||||
|
appFlagsCheckBoxLabel,
|
||||||
|
appFlagsCheckBoxLabel,NULL,
|
||||||
|
B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP);
|
||||||
|
fAppFlagsBox->SetLabel(fAppFlagsCheckBox);
|
||||||
|
}
|
||||||
|
|
||||||
|
AppTypeAppFlagsView::~AppTypeAppFlagsView()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
AppTypeAppFlagsView::IsClean() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef APP_TYPE_APP_FLAGS_VIEW_H
|
||||||
|
#define APP_TYPE_APP_FLAGS_VIEW_H
|
||||||
|
|
||||||
|
#include <Box.h>
|
||||||
|
#include <CheckBox.h>
|
||||||
|
#include <RadioButton.h>
|
||||||
|
#include <View.h>
|
||||||
|
|
||||||
|
class AppTypeAppFlagsView : public BView {
|
||||||
|
public:
|
||||||
|
AppTypeAppFlagsView(BRect viewFrame);
|
||||||
|
~AppTypeAppFlagsView();
|
||||||
|
|
||||||
|
bool IsClean() const;
|
||||||
|
private:
|
||||||
|
|
||||||
|
BBox * fAppFlagsBox;
|
||||||
|
BCheckBox * fAppFlagsCheckBox;
|
||||||
|
BRadioButton * fAppFlagsSingleRadioButton;
|
||||||
|
BRadioButton * fAppFlagsMultipleRadioButton;
|
||||||
|
BRadioButton * fAppFlagsExclusiveRadioButton;
|
||||||
|
BCheckBox * fAppFlagsArgvOnlyCheckBox;
|
||||||
|
BCheckBox * fAppFlagsBackOnlyCheckBox;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // APP_TYPE_APP_FLAGS_VIEW_H
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include <AppTypeSupportedTypesView.h>
|
||||||
|
|
||||||
|
AppTypeSupportedTypesView::AppTypeSupportedTypesView(BRect viewFrame)
|
||||||
|
: BView(viewFrame, "AppTypeSupportedTypesView", B_FOLLOW_ALL,
|
||||||
|
B_FRAME_EVENTS|B_WILL_DRAW)
|
||||||
|
{
|
||||||
|
SetViewColor( ui_color(B_PANEL_BACKGROUND_COLOR) );
|
||||||
|
}
|
||||||
|
|
||||||
|
AppTypeSupportedTypesView::~AppTypeSupportedTypesView()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
AppTypeSupportedTypesView::IsClean() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef APP_TYPE_SUPPORTED_TYPES_VIEW_H
|
||||||
|
#define APP_TYPE_SUPPORTED_TYPES_VIEW_H
|
||||||
|
|
||||||
|
#include <Box.h>
|
||||||
|
#include <Menu.h>
|
||||||
|
#include <MenuField.h>
|
||||||
|
#include <MenuItem.h>
|
||||||
|
#include <String.h>
|
||||||
|
#include <StringView.h>
|
||||||
|
#include <TextControl.h>
|
||||||
|
#include <TextView.h>
|
||||||
|
#include <View.h>
|
||||||
|
|
||||||
|
class AppTypeSupportedTypesView : public BView {
|
||||||
|
public:
|
||||||
|
AppTypeSupportedTypesView(BRect viewFrame);
|
||||||
|
~AppTypeSupportedTypesView();
|
||||||
|
|
||||||
|
bool IsClean() const;
|
||||||
|
private:
|
||||||
|
|
||||||
|
BBox * fSupportedTypesBox;
|
||||||
|
BListView * fSupportedTypesListView;
|
||||||
|
BScrollView * fSupportedTypesScrollView;
|
||||||
|
BButton * fSupportedTypesAddButton;
|
||||||
|
BButton * fSupportedTypesRemoveButton;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // APP_TYPE_SUPPORTED_TYPES_VIEW_H
|
||||||
@@ -1,13 +1,34 @@
|
|||||||
#include <AppTypeView.h>
|
#include <AppTypeView.h>
|
||||||
|
#include <AppTypeAppFlagsView.h>
|
||||||
|
#include <AppTypeSupportedTypesView.h>
|
||||||
#include <AppTypeVersionInfoView.h>
|
#include <AppTypeVersionInfoView.h>
|
||||||
|
|
||||||
AppTypeView::AppTypeView(BRect viewFrame)
|
AppTypeView::AppTypeView(BRect viewFrame)
|
||||||
: BView(viewFrame, "AppTypeView", B_FOLLOW_ALL,
|
: BView(viewFrame, "AppTypeView", B_FOLLOW_ALL,
|
||||||
B_FRAME_EVENTS|B_WILL_DRAW)
|
B_FRAME_EVENTS|B_WILL_DRAW)
|
||||||
{
|
{
|
||||||
fVersionInfoView = 0;
|
|
||||||
SetViewColor( ui_color(B_PANEL_BACKGROUND_COLOR) );
|
SetViewColor( ui_color(B_PANEL_BACKGROUND_COLOR) );
|
||||||
|
|
||||||
|
BRect signatureTextControlFrame = Bounds();
|
||||||
|
signatureTextControlFrame.top += 10;
|
||||||
|
signatureTextControlFrame.left += 10;
|
||||||
|
signatureTextControlFrame.right -= 60;
|
||||||
|
const char * signatureTextControlLabel = "Signature:";
|
||||||
|
float signatureTextControlStringWidth = StringWidth(signatureTextControlLabel);
|
||||||
|
fSignatureTextControl = new BTextControl(signatureTextControlFrame,
|
||||||
|
signatureTextControlLabel,
|
||||||
|
signatureTextControlLabel,NULL,NULL,
|
||||||
|
B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP);
|
||||||
|
fSignatureTextControl->SetDivider(signatureTextControlStringWidth+5);
|
||||||
|
AddChild(fSignatureTextControl);
|
||||||
|
|
||||||
|
BRect appFlagsViewFrame = Bounds();
|
||||||
|
appFlagsViewFrame.top = fSignatureTextControl->Bounds().bottom + 10;
|
||||||
|
appFlagsViewFrame.left += 10;
|
||||||
|
appFlagsViewFrame.right -= 60;
|
||||||
|
fAppFlagsView = new AppTypeAppFlagsView(appFlagsViewFrame);
|
||||||
|
AddChild(fAppFlagsView);
|
||||||
|
|
||||||
BRect versionInfoViewFrame = Bounds();
|
BRect versionInfoViewFrame = Bounds();
|
||||||
versionInfoViewFrame.top = Bounds().Height()/2;
|
versionInfoViewFrame.top = Bounds().Height()/2;
|
||||||
fVersionInfoView = new AppTypeVersionInfoView(versionInfoViewFrame);
|
fVersionInfoView = new AppTypeVersionInfoView(versionInfoViewFrame);
|
||||||
@@ -16,7 +37,6 @@ AppTypeView::AppTypeView(BRect viewFrame)
|
|||||||
|
|
||||||
AppTypeView::~AppTypeView()
|
AppTypeView::~AppTypeView()
|
||||||
{
|
{
|
||||||
delete fVersionInfoView;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
#ifndef APP_TYPE_VIEW_H
|
#ifndef APP_TYPE_VIEW_H
|
||||||
#define APP_TYPE_VIEW_H
|
#define APP_TYPE_VIEW_H
|
||||||
|
|
||||||
#include <Box.h>
|
|
||||||
#include <Button.h>
|
|
||||||
#include <MenuField.h>
|
|
||||||
#include <String.h>
|
|
||||||
#include <TextControl.h>
|
#include <TextControl.h>
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
|
||||||
|
class AppTypeAppFlagsView;
|
||||||
|
class AppTypeSupportedTypesView;
|
||||||
class AppTypeVersionInfoView;
|
class AppTypeVersionInfoView;
|
||||||
|
|
||||||
class AppTypeView : public BView {
|
class AppTypeView : public BView {
|
||||||
@@ -19,21 +17,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
BTextControl * fSignatureTextControl;
|
BTextControl * fSignatureTextControl;
|
||||||
|
AppTypeAppFlagsView * fAppFlagsView;
|
||||||
BBox * fAppFlagsBox;
|
AppTypeSupportedTypesView * fSupportedTypesView;
|
||||||
BCheckBox * fAppFlagsCheckBox;
|
|
||||||
BRadioButton * fAppFlagsSingleRadioButton;
|
|
||||||
BRadioButton * fAppFlagsMultipleRadioButton;
|
|
||||||
BRadioButton * fAppFlagsExclusiveRadioButton;
|
|
||||||
BCheckBox * fAppFlagsArgvOnlyCheckBox;
|
|
||||||
BCheckBox * fAppFlagsBackOnlyCheckBox;
|
|
||||||
|
|
||||||
BBox * fSupportedTypesBox;
|
|
||||||
BListView * fSupportedTypesListView;
|
|
||||||
BScrollView * fSupportedTypesScrollView;
|
|
||||||
BButton * fSupportedTypesAddButton;
|
|
||||||
BButton * fSupportedTypesRemoveButton;
|
|
||||||
|
|
||||||
AppTypeVersionInfoView * fVersionInfoView;
|
AppTypeVersionInfoView * fVersionInfoView;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <Node.h>
|
#include <Node.h>
|
||||||
#include <NodeInfo.h>
|
#include <NodeInfo.h>
|
||||||
|
#include <String.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <FileTypeApp.h>
|
#include <FileTypeApp.h>
|
||||||
#include <AppTypeView.h>
|
#include <AppTypeView.h>
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ App FileType-F :
|
|||||||
FileTypeWindow.cpp
|
FileTypeWindow.cpp
|
||||||
AppTypeWindow.cpp
|
AppTypeWindow.cpp
|
||||||
AppTypeView.cpp
|
AppTypeView.cpp
|
||||||
|
AppTypeAppFlagsView.cpp
|
||||||
|
AppTypeSupportedTypesView.cpp
|
||||||
AppTypeVersionInfoView.cpp
|
AppTypeVersionInfoView.cpp
|
||||||
process_refs.cpp
|
process_refs.cpp
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user