Update of /cvsroot/htoolkit/port/src/include
In directory sc8-pr-cvs1:/tmp/cvs-serv26873/port/src/include
Modified Files:
Internals.h Menu.h Types.h
Log Message:
Complete implementation for Menu with both GTK and Win32.
Supported:
- command menu items with bitmaps
- checked menu items
- radio menu items
- sepparators
- sub menus
Index: Internals.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/include/Internals.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Internals.h 2 Apr 2003 19:12:11 -0000 1.9
--- Internals.h 23 Apr 2003 21:48:56 -0000 1.10
***************
*** 9,12 ****
--- 9,14 ----
#ifdef WIN32_TARGET
+ #include "MenuHandlesMap.h"
+
#ifndef GET_WHEEL_DELTA_WPARAM
#define GET_WHEEL_DELTA_WPARAM(wparam) ((short)HIWORD (wparam))
***************
*** 28,31 ****
--- 30,34 ----
HFONT hControlFont;
LPSTR lpszAppName;
+ MenuHandlesMap *pMenuHandlesMap;
} FrameData;
Index: Menu.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/include/Menu.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Menu.h 1 Apr 2003 23:54:20 -0000 1.5
--- Menu.h 23 Apr 2003 21:48:57 -0000 1.6
***************
*** 4,21 ****
#include "Types.h"
! MenuHandle osAddMenu(MenuHandle parent, char *title);
! MenuHandle osAddMenuItem(MenuHandle parent, int keyCode, unsigned int mods, char *title);
! MenuHandle osAddMenuCheckItem(MenuHandle parent, int keyCode, unsigned int mods, char *title);
! void osAddMenuSeparatorItem(MenuHandle parent);
! void osSetMenuItemEnabled(MenuHandle parent, MenuHandle item, BOOL bState);
! BOOL osGetMenuItemEnabled(MenuHandle parent, MenuHandle item);
! void osSetMenuItemChecked(MenuHandle parent, MenuHandle item, BOOL bState);
! BOOL osGetMenuItemChecked(MenuHandle parent, MenuHandle item);
! void osSetMenuItemLabel(MenuHandle menu, MenuHandle item, int nKeyCode, unsigned int mods, char* title);
! void osDrawMenuBar(WindowHandle window);
#endif
--- 4,34 ----
#include "Types.h"
! MenuHandle osInsertMenu(MenuHandle parent, int pos);
! MenuHandle osInsertMenuItem(MenuHandle parent, int pos);
! MenuHandle osInsertMenuCheckItem(MenuHandle parent, int pos);
! MenuHandle osInsertMenuSeparatorItem(MenuHandle parent, int pos);
! MenuHandle osInsertMenuRadioGroup(MenuHandle parent, int pos);
! MenuHandle osInsertMenuRadioItem(MenuHandle parent, int pos);
! void osDestroyMenu(MenuHandle handle);
! int osGetMenuItemCount(MenuHandle handle);
! void osSetMenuItemEnabled(MenuHandle item, BOOL bState);
! BOOL osGetMenuItemEnabled(MenuHandle item);
! void osSetMenuItemChecked(MenuHandle item, BOOL bState);
! BOOL osGetMenuItemChecked(MenuHandle item);
! void osSetMenuRadioGroupSelection(MenuHandle handle, int selection);
! int osGetMenuRadioGroupSelection(MenuHandle handle);
!
! void osSetMenuLabel(MenuHandle item, char* title);
! char *osGetMenuLabel(MenuHandle item);
!
! void osSetMenuItemAccel(MenuHandle item, int key, unsigned int mods);
! void osGetMenuItemAccel(MenuHandle item, int *key, unsigned int *mods);
!
! void osSetMenuItemBitmap(MenuHandle handle, BitmapHandle bitmap);
+ int osGetMenuItemPos(MenuHandle handle);
#endif
Index: Types.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/include/Types.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Types.h 30 Mar 2003 18:49:08 -0000 1.8
--- Types.h 23 Apr 2003 21:48:57 -0000 1.9
***************
*** 33,37 ****
typedef HFONT FontHandle;
! typedef HMENU MenuHandle;
typedef struct
--- 33,37 ----
typedef HFONT FontHandle;
! typedef struct MenuHandle *MenuHandle;
typedef struct
***************
*** 41,45 ****
} *PolygonHandle;
! typedef struct
{
HDC hDC;
--- 41,45 ----
} *PolygonHandle;
! typedef struct CanvasHandle
{
HDC hDC;
***************
*** 92,95 ****
--- 92,96 ----
typedef GtkWidget *MenuHandle;
+ typedef GtkWidget *MenuItemHandle;
typedef struct
|