forked from humdingerb/quicklaunch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainListItem.h
56 lines (47 loc) · 1.13 KB
/
MainListItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Copyright 2010-2017. All rights reserved.
* Distributed under the terms of the MIT license.
*
* Author:
* Humdinger, [email protected]
*/
#ifndef QLLISTITEM_H
#define QLLISTITEM_H
#include <AppFileInfo.h>
#include <Bitmap.h>
#include <Entry.h>
#include <File.h>
#include <Font.h>
#include <InterfaceDefs.h>
#include <ListItem.h>
#include <MenuItem.h>
#include <Node.h>
#include <NodeInfo.h>
#include <Path.h>
#include <String.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
class MainListItem : public BListItem {
public:
MainListItem(BEntry* entry, int iconSize,
bool isFav = false);
~MainListItem();
virtual void DrawItem(BView*, BRect, bool);
virtual void Update(BView*, const BFont*);
BBitmap* Bitmap() { return fIcon; };
char* GetName() { return fName; };
entry_ref* Ref() { return &fRef; };
bool IsFavorite() { return fIsFavorite; };
void SetFavorite(bool state);
private:
char fName[B_FILE_NAME_LENGTH];
entry_ref fRef;
BPath fPath;
version_info fVersionInfo;
BBitmap* fIcon;
BBitmap* fFavoriteIcon;
int fIconSize;
bool fIsFavorite;
};
#endif // QLLISTITEM_H