home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////////////
- //
- // GEMslider
- //
- // A GEMslider is an example GEMobject derivation.
- //
- // This file is Copyright 1992 by Warwick W. Allison,
- // This file is part of the gem++ library.
- // You are free to copy and modify these sources, provided you acknowledge
- // the origin by retaining this notice, and adhere to the conditions
- // described in the file COPYING.LIB.
- //
- /////////////////////////////////////////////////////////////////////////////
-
-
- #ifndef GEMsl_h
- #define GEMsl_h
-
- #include <gemo.h>
-
-
- class GEMslider : public GEMobject
- {
- public:
- GEMslider(GEMform&, int RSCknob, int RSCrack);
- GEMslider(GEMform&, int RSCknob, int RSCrack, int RSCminus, int RSCplus);
- GEMslider(GEMform&, int RSCknob, int RSCrack,
- int RSChminus, int RSChplus,
- int RSCvminus, int RSCvplus);
- ~GEMslider();
-
- // Methods similar to GEMwindow...
-
- // No methods flush their changes.
- virtual void Flush();
-
- void SetVisibleLines(int noOfLines);
- void SetTotalLines(int noOfLines);
- void SetTopLine(int noOfLine);
- void SetVisibleColumns(int noOfColumns);
- void SetTotalColumns(int noOfColumns);
- void SetLeftColumn(int noOfColumn);
-
- int VisibleLines() { return visibleLines; }
- int VisibleColumns() { return visibleColumns; }
-
- int TopLine() { return actualTopLine; }
- int LeftColumn() { return actualLeftColumn; }
-
- void LineUp();
- void LineDown();
- void PageUp();
- void PageDown();
-
- void ColumnLeft();
- void ColumnRight();
- void PageLeft();
- void PageRight();
-
- void DOCtoGEM();
- void GEMtoDOC();
-
- GEMfeedback Touch(int x, int y, const GEMevent&);
-
- private:
- class SL_Knob* K;
- class SL_Up* U;
- class SL_Down* D;
- class SL_Left* L;
- class SL_Right* R;
- int actualTopLine,actualLeftColumn;
- int visibleLines,visibleColumns;
- int totalLines,totalColumns;
- };
-
-
- #endif
-