blob: 9f6bfdf81d26c91803648bb07f0c6b0b888736b2 (
plain)
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
|
#ifndef __FBBOOKMENU_H__
#define __FBBOOKMENU_H__
#include <wx/wx.h>
#include <wx/menu.h>
#include <wx/arrimpl.cpp>
#define fbNO_FOLDER (-999)
#define fbFLDR_DOWN (-998)
class FbMenuFolderItem
{
public:
int id;
int folder;
wxString name;
};
class FbMenuAuthorItem
{
public:
int id;
int author;
};
WX_DECLARE_OBJARRAY(FbMenuFolderItem, FbMenuFolderArray);
WX_DECLARE_OBJARRAY(FbMenuAuthorItem, FbMenuAuthorArray);
class FbBookMenu: public wxMenu
{
public:
FbBookMenu(int id, int iFolder);
static void EmptyFolders() { sm_folders.Empty(); };
static int GetFolder(const int id);
static int GetAuthor(const int id);
static void ConnectFolders(wxWindow * frame, wxObjectEventFunction func);
static void ConnectAuthors(wxWindow * frame, wxObjectEventFunction func);
private:
static void LoadFolders();
wxMenu * CreateAuthorMenu();
private:
static FbMenuFolderArray sm_folders;
static FbMenuAuthorArray sm_authors;
int m_id;
};
#endif // __FBBOOKMENU_H__
|