cdk_dscale(3)
β¨ NAME β¨
cdk_dscale β Cdk scale widget (type double) π
so like, this is the manual page for cdk_dscale(3), the Cdk scale widget where the value type is double. It's lowkey iconic, highkey useful. π¦
πΈ SYNOPSIS πΈ
okay so here's the whole vibe β¨ β compile, include, and all the function signatures, exactly as they are: π
cc [ flag ... ] file ... -lcdk [ library ... ]
#include <cdk.h>
double activateCDKDScale (
CDKDSCALE *scale,
chtype *actions);
void destroyCDKDScale (
CDKDSCALE *scale);
void drawCDKDScale (
CDKDSCALE *scale,
boolean box);
void eraseCDKDScale (
CDKDSCALE *scale);
boolean getCDKDScaleBox (
CDKDSCALE *scale);
int getCDKDScaleDigits (
CDKDSCALE *scale);
double getCDKDScaleHighValue (
CDKDSCALE *scale);
double getCDKDScaleLowValue (
CDKDSCALE *scale);
double getCDKDScaleValue (
CDKDSCALE *scale);
int injectCDKDScale (
CDKDSCALE *scale,
chtype input);
void moveCDKDScale (
CDKDSCALE *scale,
int xpos,
int ypos,
boolean relative,
boolean refresh);
CDKDSCALE *newCDKDScale (
CDKSCREEN *cdkscreen,
int xpos,
int ypos,
const char *title,
const char *label,
chtype fieldAttribute,
int fieldWidth,
double currentValue,
double lowValue,
double highValue,
double increment,
double fastIncrement,
int digits,
boolean box,
boolean shadow);
void positionCDKDScale (
CDKDSCALE *scale);
void setCDKDScale (
CDKDSCALE *scale,
double lowValue,
double highValue,
double currentValue,
boolean box);
void setCDKDScaleBackgroundAttrib (
CDKDSCALE *scale,
chtype attribute);
void setCDKDScaleBackgroundColor (
CDKDSCALE *scale,
const char * color);
void setCDKDScaleBox (
CDKDSCALE *scale,
boolean box);
void setCDKDScaleBoxAttribute (
CDKDSCALE *scale,
chtype character);
void setCDKDScaleDigits (
CDKDSCALE *scale,
int digits);
void setCDKDScaleHorizontalChar (
CDKDSCALE *scale,
chtype character);
void setCDKDScaleLLChar (
CDKDSCALE *scale,
chtype character);
void setCDKDScaleLRChar (
CDKDSCALE *scale,
chtype character);
void setCDKDScaleLowHigh (
CDKDSCALE *scale,
double low,
double high);
void setCDKDScalePostProcess (
CDKDSCALE *scale,
PROCESSFN callback,
void * data);
void setCDKDScalePreProcess (
CDKDSCALE *scale,
PROCESSFN callback,
void * data);
void setCDKDScaleULChar (
CDKDSCALE *scale,
chtype character);
void setCDKDScaleURChar (
CDKDSCALE *scale,
chtype character);
void setCDKDScaleValue (
CDKDSCALE *scale,
double value);
void setCDKDScaleVerticalChar (
CDKDSCALE *scale,
chtype character);
π¦ DESCRIPTION π¦
The Cdk scale widget? It creates a scale box with a label and a scale field. π And the functions up there? They create or manipulate the Cdk scale box widget. That's the tea. β
β¨ AVAILABLE FUNCTIONS β¨
okay bestie, this is the whole roster, every single one of them, no skips π
π activateCDKDScale
wakes the scale widget up and lets your user actually, like, interact with it π«Ά
- the
scaleparameter is a pointer to a non-NULL scale widget. - if the
actionsparameter gets passed with a non-NULL value, the characters in the array are injected straight into the widget.
if you want to activate it interactively, pass in a NULL pointer for actions β¨
if the character entered into this widget is RETURN or TAB, then this function returns a value from the low value to the high value. it also sets the widget data exitType to vNORMAL. π
if the character entered into this widget was ESCAPE, then the widget returns the unknownDouble value (peep the cdk_objs.h header file).
the widget data exitType will be set to vESCAPE_HIT.
π destroyCDKDScale
removes the widget from the screen and frees the memory the object used. gone. deleted. no crumbs. π
π drawCDKDScale
draws the scale widget on the screen ποΈ
if the box parameter is true, the widget gets drawn with a box around it.
π¦ eraseCDKDScale
removes the widget from the screen. but like, gently. this does NOT destroy the widget π«£
πΈ getCDKDScaleBox
returns whether the widget will be drawn with a box around it.
β getCDKDScaleDigits
returns the number of digits shown after the decimal point for the box value.
π₯ getCDKDScaleHighValue
returns the high value of the scale widget.
π getCDKDScaleLowValue
returns the low value of the scale widget.
π getCDKDScaleValue
returns the current value of the widget. the moment. the now. β¨
π injectCDKDScale
injects a single character into the widget π«Ά
- the
scaleparameter is a pointer to a non-NULL scale widget. - the
characterparameter is the character to inject into the widget.
the return value and the side-effect (setting the widget data exitType) depend on which character you injected, so pay attention bestie:
RETURNorTABβ the function returns a value ranging from the scale's low value to the scale's high value. the widget dataexitTypeis set tovNORMAL.ESCAPEβ the function returns theunknownDoublevalue (peep thecdk_objs.hheader file). the widget dataexitTypeis set tovESCAPE_HIT.- Otherwise β unless it gets modified by preprocessing, postprocessing or key bindings, the function returns the
unknownDoublevalue (peep thecdk_objs.hheader file). the widget dataexitTypeis set tovEARLY_EXIT.
π§ moveCDKDScale
moves the given widget to the given position π
- the
xposandyposparameters are the new position of the widget.
the xpos parameter may be an integer or one of the pre-defined values TOP, BOTTOM, and CENTER.
the ypos parameter may be an integer or one of the pre-defined values LEFT, RIGHT, and CENTER.
- the
relativeparameter states whether thexpos/ypospair is a relative move or an absolute move.
for example, if xpos = 1 and ypos = 2 and relative = TRUE, then the widget would move one row down and two columns right. if the value of relative was FALSE, then the widget would move to the position (1,2).
do not use the valuesTOP,BOTTOM,LEFT,RIGHT, orCENTERwhenrelative = TRUE. (weird things may happen). π
the final parameter refresh is a boolean value which states whether the widget will get refreshed after the move.
π newCDKDScale
creates a pointer to a scale widget π parameters incoming:
screenβ is the screen you wish this widget to be placed in.xposβ controls the placement of the object along the horizontal axis. it may be an integer or one of the pre-defined valuesLEFT,RIGHT, andCENTER.yposβ controls the placement of the object along the vertical axis. it may be an integer or one of the pre-defined valuesTOP,BOTTOM, andCENTER.titleβ is the string to display at the top of the widget. the title can be more than one line; just provide a carriage return character at the line break.labelβ is the string to display in the label of the scale field.fieldAttributeβ is the attribute of the characters displayed in the field.fieldWidthβ controls the width of the widget. if you provide a value of zero the widget will be created with the full width of the screen. if you provide a negative value, the widget will be created the full width minus the value provided.currentValueβ is the value of the scale field when the widget is activated.lowValueandhighValueβ are the low and high values of the widget respectively.incrementβ is the regular increment valuefastIncrementβ is the accelerated increment value.boxβ is true if the widget should be drawn with a box around it.shadowβ turns the shadow on or off around this widget.
if the widget could not be created then a NULL pointer is returned.
π«Ά positionCDKDScale
allows the user to move the widget around the screen via the cursor/keypad keys. peep cdk_position (3) for the key bindings π
π setCDKDScale
lets the programmer modify certain elements of an existing scale widget.
the parameter names correspond to the same parameter names listed in the newCDKDScale function.
π
setCDKDScaleBackgroundAttrib
sets the background attribute of the widget.
the attribute parameter is a curses attribute, e.g., A_BOLD.
π¨ setCDKDScaleBackgroundColor
sets the background color of the widget.
the color parameter is in the format of the Cdk format strings.
peep cdk_display (3).
π¦ setCDKDScaleBox
sets whether the widget will be drawn with a box around it.
β¨ setCDKDScaleBoxAttribute
sets the attribute of the box.
π’ setCDKDScaleDigits
sets the number of digits shown after the decimal point for the box value.
β setCDKDScaleHorizontalChar
sets the horizontal drawing character for the box to the given character.
π setCDKDScaleLLChar
sets the lower left hand corner of the widget's box to the given character.
π setCDKDScaleLRChar
sets the lower right hand corner of the widget's box to the given character.
ποΈ setCDKDScaleLowHigh
sets the low and high values of the widget.
π setCDKDScalePostProcess
allows the user to have the widget call a function after the key has been applied to the widget.
- the
functionparameter is the callback function. - the
dataparameter points to data passed to the callback function.
to learn more about post-processing peep cdk_process (3).
π setCDKDScalePreProcess
allows the user to have the widget call a function after a key is hit and before the key is applied to the widget.
- the
functionparameter is the callback function. - the
dataparameter points to data passed to the callback function.
to learn more about pre-processing peep cdk_process (3).
π setCDKDScaleULChar
sets the upper left hand corner of the widget's box to the given character.
π setCDKDScaleURChar
sets the upper right hand corner of the widget's box to the given character.
π« setCDKDScaleValue
sets the current value of the widget.
β setCDKDScaleVerticalChar
sets the vertical drawing character for the box to the given character.
β¨ KEY BINDINGS β¨
okay so when the widget is activated, there are several default key bindings that help you enter or manipulate the info quickly. here's the whole keymap, bestie β no cap. π
Down Arrowβ decrements the scale by the normal value.Up Arrowβ increments the scale by the normal value.uβ increments the scale by the normal value.Prev Pageβ decrements the scale by the accelerated value.Uβ decrements the scale by the accelerated value.Ctrl-Bβ decrements the scale by the accelerated value.Next Pageβ increments the scale by the accelerated value.Ctrl-Fβ increments the scale by the accelerated value.Homeβ sets the scale to the low value.gβ sets the scale to the low value.^β sets the scale to the low value.Endβ sets the scale to the high value.Gβ sets the scale to the high value.$β sets the scale to the high value.Returnβ exits the widget and returns the index of the selected value. this also sets the widget dataexitTypetovNORMAL.Tabβ exits the widget and returns the index of the selected value. this also sets the widget dataexitTypetovNORMAL.Escapeβ exits the widget and returns theunknownDoublevalue (see thecdk_objs.hheader file). this also sets the widget dataexitTypetovESCAPE_HIT.Ctrl-Rβ refreshes the screen.
if the cursor is not pointing to the field's value, the following key bindings apply. you may use the left/right arrows to move the cursor onto the field's value and modify it by typing characters to replace the digits and sign. π
Left Arrowβ decrements the scale by the normal value.Right Arrowβ increments the scale by the normal value.dβ decrements the scale by the normal value.Dβ increments the scale by the accelerated value.-β decrements the scale by the normal value.+β increments the scale by the normal value.0β sets the scale to the low value.
π SEE ALSO π
that's the whole vibe, bestie π«Ά β this page is cdk_dscale(3), dated 2025-10-13. stay slay. π
π¦ where this page comes from
- fedora 43: cdk 5.0.20251014-1.fc43 Β· X11-distribute-modifications-variant
- fedora 43: cdk 5.0.20251014-1.fc43 Β· X11-distribute-modifications-variant
- fedora 44: cdk 5.0.20251014-3.fc44 Β· X11-distribute-modifications-variant
- fedora 44: cdk 5.0.20251014-3.fc44 Β· X11-distribute-modifications-variant
- nixos 26.05: cdk 5.0-20260119
- nixpkgs unstable: cdk 5.0-20260119
- ubuntu resolute: libcdk5-dev 5.0.20251014-1 Β· BSD-4-Clause
- ubuntu stonking: libcdk5-dev 5.0.20260119-1 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms