diff --git a/src/add-ons/tracker/filetype/AppTypeAppFlagsView.cpp b/src/add-ons/tracker/filetype/AppTypeAppFlagsView.cpp new file mode 100644 index 0000000000..1865a86b7b --- /dev/null +++ b/src/add-ons/tracker/filetype/AppTypeAppFlagsView.cpp @@ -0,0 +1,31 @@ +#include + +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; +} diff --git a/src/add-ons/tracker/filetype/AppTypeAppFlagsView.h b/src/add-ons/tracker/filetype/AppTypeAppFlagsView.h new file mode 100644 index 0000000000..417935c408 --- /dev/null +++ b/src/add-ons/tracker/filetype/AppTypeAppFlagsView.h @@ -0,0 +1,26 @@ +#ifndef APP_TYPE_APP_FLAGS_VIEW_H +#define APP_TYPE_APP_FLAGS_VIEW_H + +#include +#include +#include +#include + +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 diff --git a/src/add-ons/tracker/filetype/AppTypeSupportedTypesView.cpp b/src/add-ons/tracker/filetype/AppTypeSupportedTypesView.cpp new file mode 100644 index 0000000000..b6d9749497 --- /dev/null +++ b/src/add-ons/tracker/filetype/AppTypeSupportedTypesView.cpp @@ -0,0 +1,18 @@ +#include + +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; +} diff --git a/src/add-ons/tracker/filetype/AppTypeSupportedTypesView.h b/src/add-ons/tracker/filetype/AppTypeSupportedTypesView.h new file mode 100644 index 0000000000..9fcc521a06 --- /dev/null +++ b/src/add-ons/tracker/filetype/AppTypeSupportedTypesView.h @@ -0,0 +1,29 @@ +#ifndef APP_TYPE_SUPPORTED_TYPES_VIEW_H +#define APP_TYPE_SUPPORTED_TYPES_VIEW_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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 diff --git a/src/add-ons/tracker/filetype/AppTypeView.cpp b/src/add-ons/tracker/filetype/AppTypeView.cpp index 9cedc91efe..3caa8e19d5 100644 --- a/src/add-ons/tracker/filetype/AppTypeView.cpp +++ b/src/add-ons/tracker/filetype/AppTypeView.cpp @@ -1,13 +1,34 @@ #include +#include +#include #include AppTypeView::AppTypeView(BRect viewFrame) : BView(viewFrame, "AppTypeView", B_FOLLOW_ALL, B_FRAME_EVENTS|B_WILL_DRAW) { - fVersionInfoView = 0; 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(); versionInfoViewFrame.top = Bounds().Height()/2; fVersionInfoView = new AppTypeVersionInfoView(versionInfoViewFrame); @@ -16,7 +37,6 @@ AppTypeView::AppTypeView(BRect viewFrame) AppTypeView::~AppTypeView() { - delete fVersionInfoView; } bool diff --git a/src/add-ons/tracker/filetype/AppTypeView.h b/src/add-ons/tracker/filetype/AppTypeView.h index 7e66ddd820..e2cab8bc1c 100644 --- a/src/add-ons/tracker/filetype/AppTypeView.h +++ b/src/add-ons/tracker/filetype/AppTypeView.h @@ -1,13 +1,11 @@ #ifndef APP_TYPE_VIEW_H #define APP_TYPE_VIEW_H -#include -#include -#include -#include #include #include +class AppTypeAppFlagsView; +class AppTypeSupportedTypesView; class AppTypeVersionInfoView; class AppTypeView : public BView { @@ -18,23 +16,10 @@ public: bool IsClean() const; private: - BTextControl * fSignatureTextControl; - - BBox * fAppFlagsBox; - BCheckBox * fAppFlagsCheckBox; - BRadioButton * fAppFlagsSingleRadioButton; - BRadioButton * fAppFlagsMultipleRadioButton; - BRadioButton * fAppFlagsExclusiveRadioButton; - BCheckBox * fAppFlagsArgvOnlyCheckBox; - BCheckBox * fAppFlagsBackOnlyCheckBox; - - BBox * fSupportedTypesBox; - BListView * fSupportedTypesListView; - BScrollView * fSupportedTypesScrollView; - BButton * fSupportedTypesAddButton; - BButton * fSupportedTypesRemoveButton; - - AppTypeVersionInfoView * fVersionInfoView; + BTextControl * fSignatureTextControl; + AppTypeAppFlagsView * fAppFlagsView; + AppTypeSupportedTypesView * fSupportedTypesView; + AppTypeVersionInfoView * fVersionInfoView; }; #endif // APP_TYPE_VIEW_H diff --git a/src/add-ons/tracker/filetype/AppTypeWindow.cpp b/src/add-ons/tracker/filetype/AppTypeWindow.cpp index 577cc5fb40..3a5ff8c109 100644 --- a/src/add-ons/tracker/filetype/AppTypeWindow.cpp +++ b/src/add-ons/tracker/filetype/AppTypeWindow.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include diff --git a/src/add-ons/tracker/filetype/Jamfile b/src/add-ons/tracker/filetype/Jamfile index e8921bb2ec..3d586b6321 100644 --- a/src/add-ons/tracker/filetype/Jamfile +++ b/src/add-ons/tracker/filetype/Jamfile @@ -11,6 +11,8 @@ App FileType-F : FileTypeWindow.cpp AppTypeWindow.cpp AppTypeView.cpp + AppTypeAppFlagsView.cpp + AppTypeSupportedTypesView.cpp AppTypeVersionInfoView.cpp process_refs.cpp ;