#if !defined RQMENUITEM_H
#define RQMENUITEM_H
#include <windows.h>
#include "rqcontrol.h"
#include "rqdefs.h"
class RQMenuItem;
class RQMenuList
{
public:
RQMenuList();
~RQMenuList();
int addToList(RQMenuItem&);
RQMenuItem *findControl(HMENU);
RQMenuItem **controlList;
int32 count;
};
class RQMenuItem: public RQControl
{
private:
char *caption;
bool checked;
protected:
void messageHandler(HWND, UINT, WPARAM, LPARAM);
public:
RQMenuItem();
RQMenuItem(const char*);
~RQMenuItem();
bool isPopup;
HWND getHandle() { return (HWND)hMenu; }
virtual void update();
RQMenuList menuList;
RQMenuItem *parentMenu;
HMENU hMenu, hParentMenu;
void setCaption(const char*);
const char* getCaption();
void setChecked(bool checked);
bool getChecked();
void setEnabled(bool enabled);
bool getEnabled();
virtual void addMenu(RQMenuItem&);
void (*onClick)(RQMenuItem&);
};
#endif
|