📄 selectwindow.h
字号:
//**************************************************************//* filename: selectwindow.h *//* *//**************************************************************//* programmed by: Thomas Wagner *//* last change: (XXX: not updated) *//**************************************************************#include <stdio.h>#include <stdlib.h>#include <X11/Xlib.h>class ClusterInfo;class RuleInfo;class SelectWindow;class IntegerSelectWindow;class ClusterOptionWindow;#ifndef SELECTWINDOW_H#define SELECTWINDOW_H//#include "lighticon.h"#include "onofficon.h"#include "scroll.h"#include "window.h"#include "textbox.h"#include "actionicon.h"// including from Olli:#include "cluster.h"#include "daten.h"#include "regel.h"// enum for SelectWindowenum SELECTWINDOWACTION { CHANGETEXTSELECTION_ACTION, SELECTWINDOW_SCROLLED_ACTION};// defines for SelectWindow#define SELECTWINDOWOPTION_EXCLUSIVESELECTION (1<<0)#define DEFAULTLIGHTSIZE 10#define SELECTWINDOW_BORDERBESIDETEXT 10#define SELECTWINDOW_INSIDESPACE 5 // between text and scrollbar// enum for ClusterOptionWindow/RuleOptionWindowenum OPTIONACTION { CHANGESELECTED_ACTION, SELECTED_OK, SELECTED_CANCEL, TEXT_DOUBLECLICKED, THRESHOLDCHANGE_ACTION, HILLHEIGHTCHANGE_ACTION, DELTA_U_CHANGE_ACTION, M_CHANGE_ACTION, //+ K_CHANGE_ACTION //+};// define for RuleOptionWindowenum RULETYP { RULETYP1, RULETYP2A, RULETYP2B};// define for RuleOptionWindow.statusenum RULEOPTIONSTATUS { RULEOPTION, CLASSIFYOPTION};#define CLUSTERTYPNUMBER 9#define VALIDYTYPNUMBER 8#define RULETYPNUMBER 3#define PARAMETERTYPNUMBER 5// enum for IntSelectWindowenum INTEGERSELECTWINDOWACTION { INTEGERSELECTWINDOW_NOOP, INTEGERSELECTWINDOW_COUNTUP, INTEGERSELECTWINDOW_COUNTDOWN, INTEGERSELECTWINDOW_LIGHTCHANGE, INTEGERSELECTWINDOW_VALUECHANGE};// defines for IntSelectWindow.options#define DISPLAY_LIGHTICON (1<<0)typedef struct SelectWindowInfo { char *Selecttext; int options; int info;} SelectWindowInfo;class RuleInfo{ public: Clustering * clustering; int inputdim; BVektor *selecteddims; BVektor *selectedcluster; Datensatz *dataset; char *datasetname; Regelbasis rules; Klassifizierung classify; RuleInfo (Clustering * initclustering = NULL, int Inputdim = 0, BVektor * Selecteddims = NULL, BVektor * Selectedcluster = NULL, Datensatz * Dataset = NULL); ~RuleInfo (); void operator = (RuleInfo & source);};class ClusterInfo{ public: Datensatz * dataset; char clustertyp; char ispossib; int clusternumber; int repeatnumber; double M; double K; int exactness; double delta_u; Guete_Typ validitytyp; BVektor *bvector; BVektor resultbvector; ClusterInfo (Datensatz * Dataset = NULL, char Ispossib = 0, int Clustertyp = FCM, int Clusternumber = 2, int Repeatnumber = 1, double initM = 2.0, double initK = 2.0, int initexactness = 10, double initdelta_u = 1.0, Guete_Typ Validitytyp = S, BVektor * Bvector = NULL); ~ClusterInfo () {; } void operator = (ClusterInfo & source);};class SelectWindow: public BigWindow{ Pixmap pixmap; BigWindow *Parent; TextBox **textboxes; ScrollWindow *scrollwindow; unsigned short textnumber; SelectWindowInfo *infos; unsigned short infonumber; unsigned short offset; int doubleclickactionnumber; int changeactionnumber; unsigned short options; public: SelectWindow (Display * initdisplay, GC initgc, BigWindow * initParent, XFontStruct * fontstruct, int initx, int inity, int initwidth, int initheight, SelectWindowInfo * InfosL, unsigned short Infonumber, int Changeactionnumber, int Doubleclickactionnumber, unsigned short initoptions); ~SelectWindow (); virtual void HandleEvent (XEvent * Event); virtual void Action (int actionnumber, int value); int GetAcuteInfo (); void ChangeInfo (SelectWindowInfo * Infos, unsigned short Infonumber); BVektor *Getbvector ();};class ClusterOptionWindow: public BigWindow{ Pixmap pixmap; BigWindow *Parent; IntegerSelectWindow *clusternumberselect; IntegerSelectWindow *repeatnumberselect;//+ IntegerSelectWindow *Mselect;//+ IntegerSelectWindow *Kselect; IntegerSelectWindow *exactnessselect; TextBox *delta_u_select; TextBox *M_select; //+ TextBox *K_select; //+ SelectWindow *clusterselectwindow; SelectWindow *dataselectwindow; SelectWindow *validityselectwindow; ActionIcon *OK, *Cancel; ClusterInfo myclusterinfo; OnOffIcon *possilighticon; int actionnumber; short possarea_left, possarea_right, possarea_bottom, possarea_top; public: ClusterOptionWindow (Display * initdisplay, GC initgc, BigWindow * initParent, XFontStruct * fontstruct, int initx, int inity, char *text, int initactionnumber, ClusterInfo * newclusterinfo); virtual ~ ClusterOptionWindow (); virtual void HandleEvent (XEvent * Event); virtual void Action (int Actionnumner, int value);};class RuleOptionWindow: public BigWindow{ Pixmap pixmap; BigWindow *Parent; double threshold; SelectWindow *dataselectwindow; SelectWindow *ruleselectwindow; SelectWindow *parameterselectwindow; ActionIcon *OK, *Cancel; RuleInfo *ruleinfo; TextBox *lowerbound, *hillheightbox; double hillheight; int actionnumber; public: RuleOptionWindow (Display * initdisplay, GC initgc, BigWindow * initParent, XFontStruct * fontstruct, int initx, int inity, char *text, int Actionnumber, RuleInfo * Ruleinfo, RULEOPTIONSTATUS initoption); virtual ~ RuleOptionWindow (); virtual void HandleEvent (XEvent * Event); virtual void Action (int Actionnumner, int value);};class IntegerSelectWindow: public BigWindow{ Pixmap pixmap; TextBox *integerbox; char *defaulttext; ActionIcon *arrowup, *arrowdown; OnOffIcon *lighticon; int minvalue, maxvalue, value; short clickarea_left, clickarea_right, clickarea_bottom, clickarea_top; public: IntegerSelectWindow (Display * initdisplay, GC initgc, BigWindow * Parent, XFontStruct * fontstruct, int initx, int inity, char *inittext, char *initdefaulttext, int Minvalue, int Maxvalue, int initvalue, unsigned short options); virtual ~ IntegerSelectWindow () { XFreePixmap (display, pixmap); delete arrowup; delete arrowdown; delete integerbox; delete lighticon; } virtual void HandleEvent (XEvent * Event); virtual void Action (int actionnumber, int value); void SetDefault (); void SetValue (int newvalue); int GetValue ();};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -