home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / gempp15b / gemsl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-23  |  1.8 KB  |  78 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  GEMslider
  4. //
  5. //  A GEMslider is an example GEMobject derivation.
  6. //
  7. //  This file is Copyright 1992 by Warwick W. Allison,
  8. //  This file is part of the gem++ library.
  9. //  You are free to copy and modify these sources, provided you acknowledge
  10. //  the origin by retaining this notice, and adhere to the conditions
  11. //  described in the file COPYING.LIB.
  12. //
  13. /////////////////////////////////////////////////////////////////////////////
  14.  
  15.  
  16. #ifndef GEMsl_h
  17. #define GEMsl_h
  18.  
  19. #include <gemo.h>
  20.  
  21.  
  22. class GEMslider : public GEMobject
  23. {
  24. public:
  25.     GEMslider(GEMform&, int RSCknob, int RSCrack);
  26.     GEMslider(GEMform&, int RSCknob, int RSCrack, int RSCminus, int RSCplus);
  27.     GEMslider(GEMform&, int RSCknob, int RSCrack,
  28.         int RSChminus, int RSChplus,
  29.         int RSCvminus, int RSCvplus);
  30.     ~GEMslider();
  31.  
  32.     // Methods similar to GEMwindow...
  33.  
  34.     // No methods flush their changes.
  35.     virtual void Flush();
  36.  
  37.     void SetVisibleLines(int noOfLines);
  38.     void SetTotalLines(int noOfLines);
  39.     void SetTopLine(int noOfLine);
  40.     void SetVisibleColumns(int noOfColumns);
  41.     void SetTotalColumns(int noOfColumns);
  42.     void SetLeftColumn(int noOfColumn);
  43.  
  44.     int VisibleLines() { return visibleLines; }
  45.     int VisibleColumns() { return visibleColumns; }
  46.  
  47.     int TopLine() { return actualTopLine; }
  48.     int LeftColumn() { return actualLeftColumn; }
  49.  
  50.     void LineUp();
  51.     void LineDown();
  52.     void PageUp();
  53.     void PageDown();
  54.     
  55.     void ColumnLeft();
  56.     void ColumnRight();
  57.     void PageLeft();
  58.     void PageRight();
  59.  
  60.     void DOCtoGEM();
  61.     void GEMtoDOC();
  62.  
  63.     GEMfeedback Touch(int x, int y, const GEMevent&);
  64.  
  65. private:
  66.     class SL_Knob* K;
  67.     class SL_Up* U;
  68.     class SL_Down* D;
  69.     class SL_Left* L;
  70.     class SL_Right* R;
  71.     int actualTopLine,actualLeftColumn;
  72.     int visibleLines,visibleColumns;
  73.     int totalLines,totalColumns;
  74. };
  75.  
  76.  
  77. #endif
  78.