My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
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
#ifndef FORM_EDITOR_COMMON__MENU_BAR_EX_H
#define FORM_EDITOR_COMMON__MENU_BAR_EX_H

#include <CtrlLib/CtrlLib.h>
using namespace Upp;

class MenuBarEx : public MenuBar
{
class MenuHeader : public Ctrl
{
String _Title;
int _CY;

public:
MenuHeader() : _CY(0) {}
MenuHeader& Title(const char* title) { _Title = String(title); return *this; }
MenuHeader& CY(int cy) { _CY = cy; return *this; }
virtual void Paint(Draw& w)
{
Rect r = GetRect();
w.DrawRect(r, LtGray());
w.DrawText(5, r.top + _CY / 2 - StdFont().GetHeight() / 2, _Title,
StdFont(), Blue());
}
};

Array<MenuHeader> _Headers;

public:
MenuBarEx& AddMenuHeader(const char* title);
};

#endif

Change log

r4180 by Sc0rch on Nov 17, 2011   Diff
MapRender: First release
(FormEditorCommon, FormEditorProperties,
Map, MapBG, MapCommon, MapEditor,
MapRenderTest.
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 722 bytes, 33 lines
Powered by Google Project Hosting