68 lines
2.3 KiB
C
Executable File
68 lines
2.3 KiB
C
Executable File
/** \file
|
|
* \brief Canvas Control
|
|
*
|
|
* See Copyright Notice in "iup.h"
|
|
*/
|
|
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <memory.h>
|
|
#include <stdarg.h>
|
|
#include <limits.h>
|
|
|
|
#include "iup.h"
|
|
#include "iupcbs.h"
|
|
|
|
#include "iup_object.h"
|
|
#include "iup_layout.h"
|
|
#include "iup_attrib.h"
|
|
#include "iup_dialog.h"
|
|
#include "iup_str.h"
|
|
#include "iup_drv.h"
|
|
#include "iup_drvinfo.h"
|
|
#include "iup_drvfont.h"
|
|
#include "iup_canvas.h"
|
|
#include "iup_key.h"
|
|
|
|
|
|
|
|
void iupdrvCanvasInitClass(Iclass* ic)
|
|
{
|
|
#if 0
|
|
/* Driver Dependent Class functions */
|
|
ic->Map = gtkCanvasMapMethod;
|
|
ic->LayoutUpdate = gtkCanvasLayoutUpdateMethod;
|
|
|
|
/* Driver Dependent Attribute functions */
|
|
|
|
/* Visual */
|
|
iupClassRegisterAttribute(ic, "BGCOLOR", NULL, gtkCanvasSetBgColorAttrib, "255 255 255", NULL, IUPAF_DEFAULT); /* force new default value */
|
|
|
|
/* IupCanvas only */
|
|
iupClassRegisterAttribute(ic, "DRAWSIZE", gtkCanvasGetDrawSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NO_INHERIT);
|
|
|
|
iupClassRegisterAttribute(ic, "DX", NULL, gtkCanvasSetDXAttrib, NULL, NULL, IUPAF_NO_INHERIT); /* force new default value */
|
|
iupClassRegisterAttribute(ic, "DY", NULL, gtkCanvasSetDYAttrib, NULL, NULL, IUPAF_NO_INHERIT); /* force new default value */
|
|
iupClassRegisterAttribute(ic, "POSX", iupCanvasGetPosXAttrib, gtkCanvasSetPosXAttrib, "0", NULL, IUPAF_NO_INHERIT); /* force new default value */
|
|
iupClassRegisterAttribute(ic, "POSY", iupCanvasGetPosYAttrib, gtkCanvasSetPosYAttrib, "0", NULL, IUPAF_NO_INHERIT); /* force new default value */
|
|
|
|
iupClassRegisterAttribute(ic, "DRAWABLE", gtkCanvasGetDrawableAttrib, NULL, NULL, NULL, IUPAF_NO_STRING);
|
|
|
|
/* IupCanvas Windows or X only */
|
|
#ifndef GTK_MAC
|
|
#ifdef WIN32
|
|
iupClassRegisterAttribute(ic, "HWND", iupgtkGetNativeWindowHandle, NULL, NULL, NULL, IUPAF_NO_STRING|IUPAF_NO_INHERIT);
|
|
#else
|
|
iupClassRegisterAttribute(ic, "XWINDOW", iupgtkGetNativeWindowHandle, NULL, NULL, NULL, IUPAF_NO_INHERIT|IUPAF_NO_STRING);
|
|
iupClassRegisterAttribute(ic, "XDISPLAY", (IattribGetFunc)iupdrvGetDisplay, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT|IUPAF_NO_STRING);
|
|
#endif
|
|
#endif
|
|
|
|
/* Not Supported */
|
|
iupClassRegisterAttribute(ic, "BACKINGSTORE", NULL, NULL, "YES", NULL, IUPAF_NOT_SUPPORTED|IUPAF_NO_INHERIT);
|
|
iupClassRegisterAttribute(ic, "TOUCH", NULL, NULL, NULL, NULL, IUPAF_NOT_SUPPORTED|IUPAF_NO_INHERIT);
|
|
#endif
|
|
}
|