- Main Page
- Classes
- Files

- File List

# C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/contextmenu.h

    00001 #ifndef _CONTEXT_MENU_H_
    00002 #define _CONTEXT_MENU_H_
    00003
    00004 #include "gadget.h"
    00005 #include "gadgeteventhandler.h"
    00006
    00007 namespace WoopsiUI {
    00008
    00009         class ContextMenuItem;
    00010
    00017         class ContextMenu : public Gadget, public GadgetEventHandler {
    00018         public:
    00019
    00024                 ContextMenu(FontBase* font = NULL);
    00025
    00030                 virtual void handleReleaseEvent(const GadgetEventArgs& e);
    00031
    00037                 virtual ContextMenuItem* newMenuItem(const char* text, u32 value);
    00038
    00043                 virtual void draw(Rect clipRect);
    00044
    00051                 virtual bool resize(u16 width, u16 height);
    00052
    00056                 virtual void reset();
    00057
    00062                 inline void setOpener(Gadget* gadget) { _opener = gadget; };
    00063
    00068                 inline Gadget* getOpener() { return _opener; };
    00069
    00074                 virtual inline bool focus() { return false; };
    00075
    00080                 virtual inline bool blur() { return false; };
    00081
    00082         private:
    00083                 Gadget* _opener;
    00088                 virtual inline ~ContextMenu() { };
    00089
    00093                 inline ContextMenu(const ContextMenu& contextMenu) : Gadget(contextMenu) { };
    00094         };
    00095 }
    00096
    00097 #endif

All Classes Functions Variables Enumerations Enumerator