Setup UI menu code

This commit is contained in:
Dr. Chat
2015-05-09 16:47:52 -05:00
parent 4411a4499d
commit 459024059a
9 changed files with 108 additions and 21 deletions

View File

@@ -21,16 +21,23 @@ namespace win32 {
class Win32MenuItem : public MenuItem {
public:
Win32MenuItem(Type type);
Win32MenuItem(Type type, const std::wstring &text);
Win32MenuItem(Type type, int id, const std::wstring &text);
~Win32MenuItem() override;
HMENU handle() { return handle_; }
int id() { return id_; }
protected:
void OnChildAdded(MenuItem* child_item) override;
void OnChildRemoved(MenuItem* child_item) override;
private:
Win32MenuItem(Type type);
HMENU handle_;
uint32_t position_; // Position within parent, if any
int id_;
};
} // namespace win32