1 #ifndef ob__menuframe_h
2 #define ob__menuframe_h
6 #include "render/render.h"
14 typedef struct _ObMenuFrame ObMenuFrame
;
15 typedef struct _ObMenuEntryFrame ObMenuEntryFrame
;
17 extern GList
*menu_frame_visible
;
21 /* stuff to be an ObWindow */
22 Window_InternalType type
;
27 /* The client that the visual instance of the menu is associated with for
29 struct _ObClient
*client
;
34 /* On-screen area (including borders!) */
36 gint inner_w
; /* inside the borders */
37 gint title_h
; /* includes the bwidth below it */
38 gint item_h
; /* height of all normal items */
39 gint text_x
; /* offset at which the text appears in the items */
40 gint text_w
; /* width of the text area in the items */
43 ObMenuEntryFrame
*selected
;
48 RrAppearance
*a_title
;
49 RrAppearance
*a_items
;
52 struct _ObMenuEntryFrame
54 struct _ObMenuEntry
*entry
;
64 RrAppearance
*a_normal
;
65 RrAppearance
*a_disabled
;
66 RrAppearance
*a_selected
;
69 RrAppearance
*a_bullet
;
70 RrAppearance
*a_text_normal
;
71 RrAppearance
*a_text_disabled
;
72 RrAppearance
*a_text_selected
;
75 ObMenuFrame
* menu_frame_new(struct _ObMenu
*menu
, struct _ObClient
*client
);
76 void menu_frame_free(ObMenuFrame
*self
);
78 void menu_frame_move(ObMenuFrame
*self
, gint x
, gint y
);
79 void menu_frame_move_on_screen(ObMenuFrame
*self
);
81 void menu_frame_show(ObMenuFrame
*self
, ObMenuFrame
*parent
);
82 void menu_frame_hide(ObMenuFrame
*self
);
84 void menu_frame_hide_all();
86 void menu_frame_select(ObMenuFrame
*self
, ObMenuEntryFrame
*entry
);
88 ObMenuFrame
* menu_frame_under(gint x
, gint y
);
89 ObMenuEntryFrame
* menu_entry_frame_under(gint x
, gint y
);
91 void menu_entry_frame_show_submenu(ObMenuEntryFrame
*self
);
93 void menu_entry_frame_execute(ObMenuEntryFrame
*self
);