Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EV_MENU_LAYOUTS_H
00023 #define EV_MENU_LAYOUTS_H
00024
00025 #include "ut_types.h"
00026 #include "xap_Types.h"
00027 #include "ut_vector.h"
00028 #include "ut_string_class.h"
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 typedef enum _ev_Menu_LayoutFlags
00042 {
00043 EV_MLF_Normal,
00044 EV_MLF_BeginSubMenu,
00045 EV_MLF_EndSubMenu,
00046 EV_MLF_BeginPopupMenu,
00047 EV_MLF_EndPopupMenu,
00048 EV_MLF_Separator
00049
00050 } EV_Menu_LayoutFlags;
00051
00052
00053
00054 class ABI_EXPORT EV_Menu_LayoutItem
00055 {
00056 public:
00057 EV_Menu_LayoutItem(XAP_Menu_Id id, EV_Menu_LayoutFlags flags);
00058 ~EV_Menu_LayoutItem();
00059
00060 XAP_Menu_Id getMenuId() const;
00061 EV_Menu_LayoutFlags getMenuLayoutFlags() const;
00062
00063 private:
00064 XAP_Menu_Id m_id;
00065 EV_Menu_LayoutFlags m_flags;
00066 };
00067
00068
00069
00070 class EV_Menu_LabelSet;
00071
00072 class ABI_EXPORT EV_Menu_Layout
00073 {
00074 public:
00075 EV_Menu_Layout(const UT_String &szName, UT_uint32 nrLayoutItems);
00076 ~EV_Menu_Layout();
00077
00078 bool setLayoutItem(UT_sint32 indexLayoutItem, XAP_Menu_Id id, EV_Menu_LayoutFlags flags);
00079 XAP_Menu_Id addLayoutItem(UT_sint32 indexLayoutItem, EV_Menu_LayoutFlags flags);
00080 void addFakeLayoutItem(UT_sint32 indexLayoutItem, EV_Menu_LayoutFlags flags);
00081 EV_Menu_LayoutItem * getLayoutItem(UT_sint32 indexLayoutItem) const;
00082 UT_sint32 getLayoutIndex(XAP_Menu_Id id) const;
00083 const char * getName() const;
00084 UT_sint32 getLayoutItemCount() const;
00085 inline UT_sint32 size() const { return getLayoutItemCount(); }
00086
00087 private:
00088 UT_String m_stName;
00089 UT_GenericVector <EV_Menu_LayoutItem *> m_layoutTable;
00090 XAP_Menu_Id m_iMaxId;
00091 };
00092
00093 #endif