⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icon.h

📁 模糊聚类分析的源程序!
💻 H
字号:
//**************************************************************//*   filename: icon.h                                         *//*                                                            *//**************************************************************//* programmed by: Thomas Wagner                               *//* last change:  (XXX: not updated)                           *//**************************************************************#include <stdio.h>#include <stdlib.h>#include <X11/Xlib.h>#include <X11/Xutil.h>#ifndef ICON_H#define ICON_H#include "window.h"#define LOW   0#define HIGH  1#define DEFAULT_FONT            "fixed"#define DEFAULT_BDWIDTH          1/* defines for Icon->status */#define ICON_SELECTED       (1<<0)#define ICON_SELECTABLE     (1<<1)#define ICON_MAPPED         (1<<2)#define ICON_REPEATEDCLICK  (1<<3)#define ICON_CHECKED        (1<<4)	// used when searching for circles#define ICON_LIGHTICON      (1<<5)#define ICON_REPEATSELECTED (1<<6)class Icon:  public Window_Info{  protected:  unsigned short status;  Pixmap pixmap_up, pixmap_down, bmp;  unsigned int bmp_width, bmp_height;    public:    Icon (Display * initdisplay,	  GC initgc,	  Window Parentwindow,	  XFontStruct * fontstruct,	  int initx, int inity, int initwidth, int initheight,	  char *text,	  char *bmptext,	  short bmpwidth, short bmpheight,	  int borderwidth,	  unsigned short initstatus);    virtual ~ Icon () {    if (pixmap_up != 0)      XFreePixmap (display, pixmap_up);    if (pixmap_down != 0)      XFreePixmap (display, pixmap_down);    if (bmp != 0)      XFreePixmap (display, bmp);  } void DrawIcon (unsigned short drawstatus);  unsigned short GetStatus () {    return status;  } void SetStatus (unsigned short newstatus) {    status = newstatus;  } void AddStatus (unsigned short newstatus) {    status |= newstatus;  } void DelStatus (unsigned short newstatus) {    status &= ~newstatus;  } void MakeSelectable ();  void MakeUnselectable ();  virtual void UnmapMe () {    XUnmapWindow (display, window);    status &= ~ICON_MAPPED;  } virtual void MapMe () {    XMapWindow (display, window);    status |= ICON_MAPPED;  } char IsSelected () {    return (status & ICON_SELECTED);  } char IsMapped () {    return (status & ICON_MAPPED);  }};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -