35 RULER_VERTICAL = 0x00008000,
37 RULER_TICKS_TOP = 0x00010000,
38 RULER_TICKS_BOTTOM = 0x00020000,
39 RULER_TICKS_LEFT = RULER_TICKS_TOP,
40 RULER_TICKS_RIGHT = RULER_TICKS_BOTTOM,
41 RULER_TICKS_CENTER = RULER_TICKS_TOP|RULER_TICKS_BOTTOM,
42 RULER_NUMBERS = 0x00040000,
43 RULER_ARROW = 0x00080000,
44 RULER_MARKERS = 0x00100000,
46 RULER_ENGLISH = 0x00200000,
47 RULER_MARGIN_ADJUST = 0x00400000,
48 RULER_ALIGN_CENTER = 0,
49 RULER_ALIGN_LEFT = 0x00800000,
50 RULER_ALIGN_RIGHT = 0x01000000,
51 RULER_ALIGN_TOP = RULER_ALIGN_LEFT,
52 RULER_ALIGN_BOTTOM = RULER_ALIGN_RIGHT,
53 RULER_ALIGN_STRETCH = RULER_ALIGN_LEFT|RULER_ALIGN_RIGHT,
54 RULER_ALIGN_NORMAL = RULER_ALIGN_CENTER
86 FXdouble pixelPerTick;
101 FXint picked(FXint x,FXint y);
102 void drawLeftArrow(
FXDCWindow& dc,FXint x,FXint y);
103 void drawRightArrow(
FXDCWindow& dc,FXint x,FXint y);
104 void drawUpArrow(
FXDCWindow& dc,FXint x,FXint y);
105 void drawDownArrow(
FXDCWindow& dc,FXint x,FXint y);
106 void drawLeftMarker(
FXDCWindow& dc,FXint x,FXint y);
107 void drawRightMarker(
FXDCWindow& dc,FXint x,FXint y);
108 void drawUpMarker(
FXDCWindow& dc,FXint x,FXint y);
109 void drawDownMarker(
FXDCWindow& dc,FXint x,FXint y);
123 long onPaint(
FXObject*,FXSelector,
void*);
124 long onLeftBtnPress(
FXObject*,FXSelector,
void*);
125 long onLeftBtnRelease(
FXObject*,FXSelector,
void*);
126 long onMotion(
FXObject*,FXSelector,
void*);
127 long onCmdSetValue(
FXObject*,FXSelector,
void*);
128 long onCmdSetIntValue(
FXObject*,FXSelector,
void*);
129 long onCmdGetIntValue(
FXObject*,FXSelector,
void*);
130 long onCmdSetHelp(
FXObject*,FXSelector,
void*);
131 long onCmdGetHelp(
FXObject*,FXSelector,
void*);
132 long onCmdSetTip(
FXObject*,FXSelector,
void*);
133 long onCmdGetTip(
FXObject*,FXSelector,
void*);
134 long onQueryHelp(
FXObject*,FXSelector,
void*);
135 long onQueryTip(
FXObject*,FXSelector,
void*);
138 ID_ARROW=FXFrame::ID_LAST,
144 FXRuler(
FXComposite* p,
FXObject* tgt=
nullptr,FXSelector sel=0,FXuint opts=RULER_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
147 virtual void layout();
150 virtual void create();
153 virtual void detach();
156 virtual FXint getDefaultWidth();
159 virtual FXint getDefaultHeight();
162 void setPosition(FXint pos,FXbool notify=
false);
168 void setContentSize(FXint size,FXbool notify=
false);
169 FXint getContentSize()
const;
172 FXint getDocumentLower()
const;
175 FXint getDocumentUpper()
const;
178 void setDocumentSize(FXint size,FXbool notify=
false);
179 FXint getDocumentSize()
const {
return documentSize; }
182 void setEdgeSpacing(FXint space,FXbool notify=
false);
183 FXint getEdgeSpacing()
const {
return edgeSpacing; }
186 void setMarginLower(FXint mgn,FXbool notify=
false);
187 FXint getMarginLower()
const {
return marginLower; }
190 void setMarginUpper(FXint mgn,FXbool notify=
false);
191 FXint getMarginUpper()
const {
return marginUpper; }
194 void setIndentFirst(FXint ind,FXbool notify=
false);
195 FXint getIndentFirst()
const {
return indentFirst; }
198 void setIndentLower(FXint ind,FXbool notify=
false);
199 FXint getIndentLower()
const {
return indentLower; }
202 void setIndentUpper(FXint ind,FXbool notify=
false);
203 FXint getIndentUpper()
const {
return indentUpper; }
206 void setNumberTicks(FXint ticks,FXbool notify=
false);
207 FXint getNumberTicks()
const {
return numberTicks; }
210 void setMajorTicks(FXint ticks,FXbool notify=
false);
211 FXint getMajorTicks()
const {
return majorTicks; }
214 void setMediumTicks(FXint ticks,FXbool notify=
false);
215 FXint getMediumTicks()
const {
return mediumTicks; }
218 void setTinyTicks(FXint ticks,FXbool notify=
false);
219 FXint getTinyTicks()
const {
return tinyTicks; }
222 void setPixelPerTick(FXdouble space,FXbool notify=
false);
223 FXdouble getPixelPerTick()
const {
return pixelPerTick; }
226 void setFont(FXFont *fnt,FXbool notify=
false);
232 void setValue(FXint value);
238 void setRulerStyle(FXuint style);
241 FXuint getRulerStyle()
const;
244 void setRulerAlignment(FXuint alignment,FXbool notify=
false);
247 FXuint getRulerAlignment()
const;
253 void setTextColor(FXColor clr);
268 virtual void save(
FXStream& store)
const;
void setTipText(const FXString &text)
Set the tool tip message for the ruler.
Definition: FXRuler.h:262
The ruler widget is placed alongside a document to measure position and size of entities within the d...
Definition: FXRuler.h:75
FXColor getTextColor() const
Get the current text color.
Definition: FXRuler.h:250
FXint getPosition() const
Return the current position.
Definition: FXRuler.h:165
The Frame widget provides borders around some contents.
Definition: FXFrame.h:58
FXFont * getFont() const
Get the text font.
Definition: FXRuler.h:229
const FXString & getHelpText() const
Get the status line help text for the ruler.
Definition: FXRuler.h:259
Base composite.
Definition: FXComposite.h:32
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
void setHelpText(const FXString &text)
Set the status line help text for the ruler.
Definition: FXRuler.h:256
Definition: FX4Splitter.h:28
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
Window Device Context.
Definition: FXDCWindow.h:48
FXint getValue() const
Return arrow value in document.
Definition: FXRuler.h:235
const FXString & getTipText() const
Get the tool tip message for the ruler.
Definition: FXRuler.h:265
Font class.
Definition: FXFont.h:137
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42