290 typedef struct frame_list
297 typedef struct mdd_frame
299 r_Ref < r_GMarray > mdd;
306 typedef struct collection_desc
317 typedef struct user_event
324 typedef struct keyword_to_ident
331 typedef struct keyword_to_ident_c
335 } keyword_to_ident_c;
345 void rviewDeleteCollection(collection_desc *coll);
348 void rviewEventHandler(wxObject &obj, wxEvent &evt);
351 extern int rviewParseProjection(
const r_Minterval &interv, r_Point &pt1, r_Point &pt2,
const char *projString,
unsigned int *freeDims=NULL, r_Point *mapIndex=NULL);
354 extern rviewBaseType rviewGetBasetype(r_Object *obj);
358 extern int rviewPrintTypedCell(
const r_Type *baseType,
char *buffer,
char *data,
int numberBase);
361 extern void rviewQuicksortStrings(
char *array[],
int from,
int to);
364 extern void rviewInitCharacterTables(
void);
367 extern int rviewLookupKeyword(
const char *key,
const keyword_to_ident_c *kti,
int tabsize,
bool caseSensitive);
371 class colourspaceMapper;
372 struct colourspace_params_s;
373 extern int rviewCheckInitCspace(rviewBaseType baseType, colourspaceMapper **csmap, r_Ref<r_GMarray> &mddObj,
bool fullRange=
FALSE, r_Minterval *domain=NULL,
int w=0,
int *newPitch=NULL,
int *newDepth=NULL,
int *newPad=NULL,
int *virtualPitch=NULL,
const struct colourspace_params_s *cp=NULL);
376 extern long asctol(
const char *str);
377 extern int asctoi(
const char *str);
378 extern double asctof(
const char *str);
379 extern long stringtol(
const char *str,
char **endptr=NULL);
380 extern double stringtof(
const char *str,
char **endptr=NULL);
391 DynamicString(
const DynamicString &ds);
392 DynamicString(
const char *str);
393 ~DynamicString(
void);
395 DynamicString &first(
const char *str,
unsigned int num);
396 DynamicString &operator=(
const DynamicString &ds);
397 DynamicString &operator=(
const char *str);
398 bool operator==(
const DynamicString &ds)
const;
401 const char *ptr(
void)
const;
402 operator const char*(void)
const;
409 static const char emptyString[];
420 DynamicStack(
unsigned int gran=8);
421 DynamicStack(
const DynamicStack<T> &src);
424 int push(
const T &item);
426 int peek(T &item)
const;
427 unsigned int getNumber(
void)
const;
432 int ensureFree(
void);
434 unsigned int number,
max, granularity;
445 rviewFrameTypeGeneric,
450 rviewFrameTypeDialog,
451 rviewFrameTypeErrorbox,
452 rviewFrameTypeProgress,
453 rviewFrameTypeStrSet,
454 rviewFrameTypeCspace,
455 rviewFrameTypeImgSet,
456 rviewFrameTypeRenCtrl,
457 rviewFrameTypeResult,
459 rviewFrameTypeDisplay,
461 rviewFrameTypeFltBsImage,
462 rviewFrameTypeFlatImage,
463 rviewFrameTypeRndImage,
464 rviewFrameTypeVolImage,
465 rviewFrameTypeHghtImage,
466 rviewFrameTypeScaledImage,
467 rviewFrameTypeOSectionImage,
471 rviewFrameTypeStringViewer,
472 rviewFrameTypeRenView,
473 rviewFrameTypeNumberOfTypes
482 class rviewFrame:
public wxFrame
486 rviewFrame(wxFrame *parent,
char *title,
int x,
int y,
int w,
int h);
487 virtual ~rviewFrame(
void);
494 int checkobj(wxObject &obj);
498 virtual void label(
void) = 0;
506 virtual int process(wxObject &obj, wxEvent &evt) = 0;
510 virtual int userEvent(
const user_event &ue);
514 virtual int requestQuit(
int level);
517 virtual void childMouseEvent(wxWindow *child, wxMouseEvent &mevt);
522 void setParent(rviewFrame *parent);
523 void registerChild(rviewFrame *child);
524 void deregisterChild(rviewFrame *child);
527 virtual const char *getFrameName(
void)
const;
530 virtual rviewFrameType getFrameType(
void)
const;
535 virtual bool OnClose(
void);
541 rviewFrameMgr *frames;
542 rviewFrame *parentFrame;
543 int frameWidth, frameHeight;
550 int checkobj_rec(wxWindow *whence, wxObject &obj);
568 rviewFrameMgr(
bool delChild);
569 ~rviewFrameMgr(
void);
571 void registerFrame(rviewFrame *client);
572 void deregisterFrame(rviewFrame *client);
573 int numberOfFrames(
void)
const;
574 void setDeleteMode(
bool delChild);
581 void broadcastEvent(wxObject &obj, wxEvent &evt);
582 int broadcastQuit(
int level);
583 int broadcastUserEvent(
const user_event &ue);
588 frame_list *frameList;
589 frame_list *tailList;
606 rviewMultiline(wxPanel *Panel,
int X,
int Y,
int H,
int Lines);
607 rviewMultiline(wxPanel *Panel,
const char *Message,
int X,
int Y,
int W,
int H,
int Lines);
608 ~rviewMultiline(
void);
611 int getMessageHeight(
void)
const;
613 void rebuild(
const char *Message,
int W);
616 static const int multiline_ppc10;
621 void setupVariables(wxPanel *Panel,
int X,
int Y,
int H,
int Lines);
624 wxMessageOutput **msg;
634 #include <wx/univ/textctrl.h>
636 class rviewText :
public wxTextCtrl
640 rviewText(wxPanel *parent,
const char *value=NULL,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
641 rviewText(
long style, wxPanel *parent,
const char *value=NULL,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
642 rviewText(wxPanel *parent,
const DynamicString &value,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
643 rviewText(wxPanel *parent,
int value,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
644 rviewText(wxPanel *parent,
long value,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
645 rviewText(wxPanel *parent,
double value,
bool sciForm=
FALSE,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
647 void SetValue(
char *value);
648 void SetValue(
const char *value);
649 void SetValue(
const DynamicString &value);
650 void SetValue(
int value);
651 void SetValue(
unsigned int value);
652 void SetValue(
long value);
653 void SetValue(
double value,
bool sciFrom=
FALSE);
655 char *GetValue(
void);
656 void GetValue(DynamicString &value);
657 void GetValue(
int &value);
658 void GetValue(
long &value);
659 void GetValue(
float &value);
660 void GetValue(
double &value);
663 class rviewButton :
public wxButton
667 rviewButton(wxPanel *parent,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1,
long style=0);
671 class rviewChoice :
public wxChoice
675 rviewChoice(wxPanel *parent,
int n,
char *choices[],
char *label=
"X",
int x=-1,
int y=-1,
int w=-1,
int h=-1,
long style=0);
677 rviewChoice(wxPanel *parent,
int n,
const char *choices[],
char *label=
"X",
int x=-1,
int y=-1,
int w=-1,
int h=-1,
long style=0);
680 class rviewCheckBox :
public wxCheckBox
684 rviewCheckBox(wxPanel *parent,
char *label=
"",
int x=-1,
int y=-1,
int w=-1,
int h=-1);
687 class rviewRadioButton :
public wxRadioButton
691 rviewRadioButton(wxPanel *parent,
char *label=
"",
bool value=
FALSE,
int x=-1,
int y=-1,
int w=-1,
int h=-1);
694 class rviewScrollBar :
public wxScrollBar
698 rviewScrollBar(wxPanel *parent,
int x=-1,
int y=-1,
int w=-1,
int h=-1,
long style=wxHORIZONTAL);
701 class rviewSlider :
public wxSlider
705 rviewSlider(wxPanel *parent,
int value,
int min_val,
int max_val,
int width,
char *label=
"",
int x=-1,
int y=-1,
long style=wxHORIZONTAL);
717 class rviewSpecialSlider :
public wxGLCanvas
720 rviewSpecialSlider(rviewFrame *logParent, wxPanel *parent,
int val,
int min,
int max,
int width=-1,
const char *label=NULL);
721 ~rviewSpecialSlider(
void);
723 int GetMax(
void)
const;
724 int GetMin(
void)
const;
725 int GetValue(
void)
const;
726 void SetRange(
int min,
int max);
727 void SetValue(
int val);
728 bool PositionInWell(
float posx,
float posy);
730 virtual void SetLabel(
const char *label);
731 virtual void OnPaint(
void);
732 virtual void OnEvent(wxMouseEvent &mevt);
736 void getWellVert(
int &y0,
int &y1);
737 void getBarParams(
float &posx,
float &posy,
float &height);
738 int calcNewValue(
float posx,
float posy,
int &val,
bool checky=
FALSE);
739 void redrawCore(
float x,
float y,
float bheight);
740 void getUpdateInterval(
float oldx,
float newx,
float &clipx,
float &clipw);
741 void updateWell(
float oldx,
float newx,
float posy,
float bheight);
746 wxColour labelColour;
752 int border, barwidth, barheight;
753 int value, vmin, vmax;
756 DynamicString myLabel;
757 rviewFrame *logicalParent;
758 static const int dflt_width;
759 static const int dflt_height;
760 static const int dflt_border;
761 static const int dflt_barwidth;
762 static const int dflt_barheight;
771 class rviewDialog:
public rviewFrame
775 rviewDialog(
const char *title,
const char *message,
int buttonNo,
const char *buttons[]);
776 virtual ~rviewDialog(
void);
777 void OnSize(
int w,
int h);
783 int process(wxObject &obj, wxEvent &evt);
785 virtual const char *getFrameName(
void)
const;
786 virtual rviewFrameType getFrameType(
void)
const;
790 static const int dialog_width;
791 static const int dialog_height;
793 static const int dialog_border;
795 static const int dialog_buttonsx;
796 static const int dialog_buttonsy;
798 static const int dialog_bheight;
800 static const int dialog_lines;
802 static const int dialog_lheight;
822 class rviewErrorbox:
public rviewDialog
827 rviewErrorbox(
const char *message);
828 rviewErrorbox(
const char *title,
const char *message,
int buttonNo,
const char *buttons[]);
829 ~rviewErrorbox(
void);
832 virtual const char *getFrameName(
void)
const;
833 virtual rviewFrameType getFrameType(
void)
const;
836 static rviewErrorbox *newErrorbox(
const char *message,
const char *classname=NULL,
const char *funcname=NULL);
837 static rviewErrorbox *newErrorbox(
const char *title,
const char *message,
int buttonNo,
const char *buttons[],
const char *classname=NULL,
const char *funcname=NULL);
838 static int reportError(
const char *message,
const char *classname=NULL,
const char *funcname=NULL);
839 static int reportError(
const char *title,
const char *message,
int buttonNo,
const char *buttons[],
const char *classname=NULL,
const char *funcname=NULL);
843 static char *buildErrorMessage(
const char *message,
const char *classname,
const char *funcname);
852 class rviewProgress:
public rviewDialog
857 rviewProgress(
const char *message);
858 ~rviewProgress(
void);
860 int process(wxObject &obj, wxEvent &evt);
862 virtual const char *getFrameName(
void)
const;
863 virtual rviewFrameType getFrameType(
void)
const;
874 class rviewResult:
public rviewFrame
879 rviewResult(collection_desc *collection);
881 void setCollection(collection_desc *collection);
884 int process(wxObject &obj, wxEvent &evt);
885 int userEvent(
const user_event &ue);
887 void OnSize(
int w,
int h);
888 void OnMenuCommand(
int id);
890 virtual const char *getFrameName(
void)
const;
891 virtual rviewFrameType getFrameType(
void)
const;
895 static const int result_x;
896 static const int result_y;
898 static const int result_width;
899 static const int result_height;
901 static const int result_border;
903 static const int result_lheight;
905 static const int result_header;
907 static const int result_cwidth;
909 static const int result_twidth;
910 static const int result_theight;
912 static const int result_bwidth;
913 static const int result_bheight;
918 void setupVariables(
void);
919 void openViewer(
int item);
920 int updateSelection(
void);
921 void configureGrey(
void);
922 int parseResampleString(
const char *resStr,
double *values);
923 int resampleSelection(
void);
924 char *mddDescriptorString(std::ostream &memstr,
int number);
925 void convertSelectedItems(
void);
927 void operationPrologue(
void);
928 void operationEpilogue(
const char *opname);
930 collection_desc *coll;
937 wxMessage *collName, *collType, *collInfo;
942 rviewText *resampText;
943 rviewChoice *scaleMode;
944 rviewButton *resampBut;
946 rviewTypeMan *typeManager;
955 class rviewAbout:
public rviewFrame
963 int process(wxObject &obj, wxEvent &evt);
965 void OnSize(
int w,
int h);
967 virtual const char *getFrameName(
void)
const;
968 virtual rviewFrameType getFrameType(
void)
const;
972 static const int about_width;
973 static const int about_height;
975 static const int about_border;
977 static const int about_pheight;
979 static const int about_bwidth;
980 static const int about_bheight;
982 static const int about_mheight;
987 void deleteLabels(
void);
1000 class rviewStringSet:
public rviewFrame
1004 rviewStringSet(collection_desc *desc);
1005 ~rviewStringSet(
void);
1008 int process(wxObject &obj, wxEvent &evt);
1009 void OnSize(
int w,
int h);
1011 int getNumItems(
void);
1012 void addItem(
const char *
string);
1013 char *getItem(
int number);
1015 virtual const char *getFrameName(
void)
const;
1016 virtual rviewFrameType getFrameType(
void)
const;
1020 static const int strset_width;
1021 static const int strset_height;
1023 static const int strset_border;
1025 static const int strset_reserve;
1027 static const int strset_bwidth;
1028 static const int strset_bheight;
1030 static const int strset_mheight;
1037 rviewButton *dismiss;
1038 wxMessage *collName, *collType, *collInfo;
1051 extern labelManager *lman;
1052 extern rviewFrameMgr *frameManager;
1053 extern unsigned char lowerCaseTable[256];
1056 #if (defined(EARLY_TEMPLATE) && defined(__EXECUTABLE__))
1057 #include "rviewUtils.cpp"
Definition: raslib/type.hh:56
#define FALSE
Definition: defs.h:70
#define min(a, b)
Definition: defs.h:78
#define max(a, b)
Definition: defs.h:77
bool operator==(const OId::OIdPrimitive one, const OId &two)