Updated to new header indentation style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30352 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2,91 +2,118 @@
|
|||||||
* Copyright 2005, Jérôme DUVAL. All rights reserved.
|
* Copyright 2005, Jérôme DUVAL. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PACKAGEVIEWS_H__
|
#ifndef __PACKAGEVIEWS_H__
|
||||||
#define __PACKAGEVIEWS_H__
|
#define __PACKAGEVIEWS_H__
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <CheckBox.h>
|
#include <CheckBox.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <List.h>
|
#include <List.h>
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
class Group {
|
class Group {
|
||||||
public:
|
public:
|
||||||
Group();
|
Group();
|
||||||
virtual ~Group();
|
virtual ~Group();
|
||||||
void SetGroupName(const char *group) { strcpy(fGroup, group); };
|
void SetGroupName(const char* group)
|
||||||
const char * GroupName() const { return fGroup; };
|
{ strcpy(fGroup, group); }
|
||||||
private:
|
const char* GroupName() const
|
||||||
char fGroup[64];
|
{ return fGroup; }
|
||||||
|
private:
|
||||||
|
char fGroup[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Package : public Group {
|
class Package : public Group {
|
||||||
public:
|
public:
|
||||||
Package(const char *folder);
|
Package(const char* folder);
|
||||||
virtual ~Package();
|
virtual ~Package();
|
||||||
void SetFolder(const char *folder) { strcpy(fFolder, folder); };
|
|
||||||
void SetName(const char *name) { strcpy(fName, name);};
|
|
||||||
void SetDescription(const char *description) { strcpy(fDescription, description);};
|
|
||||||
void SetSize(const int32 size) { fSize = size; };
|
|
||||||
void SetIcon(BBitmap * icon) { delete fIcon; fIcon = icon; };
|
|
||||||
void SetOnByDefault(bool onByDefault) { fOnByDefault = onByDefault; };
|
|
||||||
void SetAlwaysOn(bool alwaysOn) { fAlwaysOn = alwaysOn; };
|
|
||||||
const char * Folder() const { return fFolder; };
|
|
||||||
const char * Name() const { return fName; };
|
|
||||||
const char * Description() const { return fDescription; };
|
|
||||||
const int32 Size() const { return fSize; };
|
|
||||||
void GetSizeAsString(char *string);
|
|
||||||
const BBitmap * Icon() const { return fIcon; };
|
|
||||||
bool OnByDefault() const { return fOnByDefault; };
|
|
||||||
bool AlwaysOn() const { return fAlwaysOn; };
|
|
||||||
|
|
||||||
static Package *PackageFromEntry(BEntry &dir);
|
void SetFolder(const char* folder)
|
||||||
private:
|
{ strcpy(fFolder, folder); }
|
||||||
char fFolder[64];
|
void SetName(const char* name)
|
||||||
char fName[64];
|
{ strcpy(fName, name); }
|
||||||
char fDescription[64];
|
void SetDescription(const char* description)
|
||||||
int32 fSize;
|
{ strcpy(fDescription, description); }
|
||||||
BBitmap *fIcon;
|
void SetSize(const int32 size)
|
||||||
bool fAlwaysOn, fOnByDefault;
|
{ fSize = size; }
|
||||||
|
void SetIcon(BBitmap* icon)
|
||||||
|
{ delete fIcon; fIcon = icon; }
|
||||||
|
void SetOnByDefault(bool onByDefault)
|
||||||
|
{ fOnByDefault = onByDefault; }
|
||||||
|
void SetAlwaysOn(bool alwaysOn)
|
||||||
|
{ fAlwaysOn = alwaysOn; }
|
||||||
|
const char* Folder() const
|
||||||
|
{ return fFolder; }
|
||||||
|
const char* Name() const
|
||||||
|
{ return fName; }
|
||||||
|
const char* Description() const
|
||||||
|
{ return fDescription; }
|
||||||
|
const int32 Size() const
|
||||||
|
{ return fSize; }
|
||||||
|
void GetSizeAsString(char* string);
|
||||||
|
const BBitmap* Icon() const
|
||||||
|
{ return fIcon; }
|
||||||
|
bool OnByDefault() const
|
||||||
|
{ return fOnByDefault; }
|
||||||
|
bool AlwaysOn() const
|
||||||
|
{ return fAlwaysOn; }
|
||||||
|
|
||||||
|
static Package* PackageFromEntry(BEntry &dir);
|
||||||
|
|
||||||
|
private:
|
||||||
|
char fFolder[64];
|
||||||
|
char fName[64];
|
||||||
|
char fDescription[64];
|
||||||
|
int32 fSize;
|
||||||
|
BBitmap* fIcon;
|
||||||
|
bool fAlwaysOn;
|
||||||
|
bool fOnByDefault;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PackageCheckBox : public BCheckBox {
|
class PackageCheckBox : public BCheckBox {
|
||||||
public:
|
public:
|
||||||
PackageCheckBox(BRect rect, Package *item);
|
PackageCheckBox(BRect rect, Package* item);
|
||||||
virtual ~PackageCheckBox();
|
virtual ~PackageCheckBox();
|
||||||
virtual void Draw(BRect update);
|
|
||||||
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
|
virtual void Draw(BRect updateRect);
|
||||||
Package *GetPackage() { return fPackage; };
|
virtual void MouseMoved(BPoint point, uint32 transit,
|
||||||
private:
|
const BMessage* dragMessage);
|
||||||
Package *fPackage;
|
|
||||||
|
Package* GetPackage()
|
||||||
|
{ return fPackage; };
|
||||||
|
private:
|
||||||
|
Package* fPackage;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GroupView : public BStringView {
|
|
||||||
public:
|
|
||||||
GroupView(BRect rect, Group *group);
|
|
||||||
virtual ~GroupView();
|
|
||||||
private:
|
|
||||||
Group *fGroup;
|
|
||||||
|
|
||||||
|
class GroupView : public BStringView {
|
||||||
|
public:
|
||||||
|
GroupView(BRect rect, Group* group);
|
||||||
|
virtual ~GroupView();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Group* fGroup;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class PackagesView : public BView {
|
class PackagesView : public BView {
|
||||||
public:
|
public:
|
||||||
PackagesView(BRect rect, const char* name);
|
PackagesView(BRect rect, const char* name);
|
||||||
virtual ~PackagesView();
|
virtual ~PackagesView();
|
||||||
void Clean();
|
|
||||||
void AddPackages(BList &list, BMessage *msg);
|
void Clean();
|
||||||
void GetTotalSizeAsString(char *string);
|
void AddPackages(BList& list, BMessage* message);
|
||||||
void GetPackagesToInstall(BList *list, int32 *size);
|
void GetTotalSizeAsString(char* string);
|
||||||
private:
|
void GetPackagesToInstall(BList* list, int32* size);
|
||||||
BList fViews;
|
|
||||||
|
private:
|
||||||
|
BList fViews;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __PACKAGEVIEWS_H__ */
|
#endif // __PACKAGEVIEWS_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user