#ifndef __MENUMAKER_H
#define __MENUMAKER_H
#include "../BBApi.h"
#include "../Settings.h"
#include "../PluginManager.h"
#include "Menu.h"
#include "MenuItem.h"
#include "FolderItem.h"
#include "CommandItem.h"
#include "StringItem.h"
#include "SpecialFolder.h"
#include "ConfigMenu.h"
#include "DesktopMenu.h"
#include "ToolbarMenu.h"
#include "SystembarMenu.h"
#include "SlitMenu.h"
#include "StylesMenu.h"
#include "ThemesMenu.h"
#include "PluginMenu.h"
#include "Painter.h"
#include <io.h>
#include <shlwapi.h>
using namespace std;
class MenuMaker
{
public:
MenuMaker();
~MenuMaker();
void Initialize(HINSTANCE hInst);
void ReadConfig();
void ParseMenu();
void ParseFolder(FILE *pMenu, Menu *pRoot);
bool ParseLine(FILE *pMenu, Menu *pRoot, char *pszLine);
void AddHeaderItem(Menu* pMenu, LPSTR pszTitle);
void AddBottomItem(Menu* pMenu);
Menu *LoadFolder(LPSTR pszTitle, LPSTR pszFolder, int menuType);
void InsertFolder(Menu *pMenu, LPSTR pszFolder, bool includeSubFolders, bool themesMenu);
void Show(int index = 0);
void Hide(int index = 0);
void ShowRootMenu();
void ShowDesktopMenu();
void ShowToolbarMenu();
void ShowSystembarMenu();
void ShowSlitMenu();
void ShowStylesMenu();
void ShowThemesMenu();
Painter* MakePainter(DWORD dwColor, DWORD dwGradColor, int nType, bool bInterlaced, int, int, int);
MenuItem* CreateMenuItem(Menu *pMenu, char* pszCommand, char* pszArgument, char* pszTitle, bool isSelected);
vector<Menu *> m_RootMenus;
vector<Painter*> m_Painters;
HINSTANCE hInst;
char m_szHotListName[256];
DWORD m_nGradientTitle;
DWORD m_nGradientEntry;
DWORD m_nGradientSelEntry;
int m_nTitleHeight;
int m_nSubmenuHeight;
int m_nBottomHeight;
int m_nSeparatorHeight;
COLORREF m_nBorderColor;
int m_nBorderWidth;
Menu *m_pRoot;
Menu *m_pDesktopMenu;
Menu *m_pToolbarMenu;
Menu *m_pSystembarMenu;
Menu *m_pSlitMenu;
Menu *m_pStylesMenu;
Menu *m_pThemesMenu;
Menu *m_pPluginMenu;
Painter* m_pTitle;
Painter* m_pEntry;
Painter* m_pSelEntry;
Painter* m_pBottom;
HFONT m_hDefaultFont;
HFONT m_hEntryFont;
};
#endif
syntax highlighting by