sptk2 logo
SPTK Home Page
Public Member Functions | Static Protected Member Functions | List of all members
sptk::CDateControl Class Reference

Date input widget. More...

#include <CDateControl.h>

Inheritance diagram for sptk::CDateControl:

Public Member Functions

 CDateControl (int x, int y, int w, int h, const char *label=nullptr)
 
CSmallButtonbutton ()
 
CInput_input ()
 
void resize (int x, int y, int w, int h) override
 
void preferredSize (int &w, int &h, int &editorWidth, int &buttonWidth)
 
void preferredHeight (int &h)
 

Static Protected Member Functions

static void date_cb (Fl_Widget *w, void *data)
 

Detailed Description

Date input widget.

A masked date input with a small drop-down button inside. Clicking on the button displays the calendar window.

Constructor & Destructor Documentation

◆ CDateControl()

sptk::CDateControl::CDateControl ( int  x,
int  y,
int  w,
int  h,
const char *  label = nullptr 
)

Constructor in FLTK style

Parameters
xint, x-position
yint, y-position
wint, width
hint, height
labelconst char *, label

Member Function Documentation

◆ button()

CSmallButton * sptk::CDateControl::button ( )
inline

Returns internal small button pointer

◆ date_cb()

static void sptk::CDateControl::date_cb ( Fl_Widget *  w,
void *  data 
)
staticprotected

Internal callback

◆ input()

CInput_ * sptk::CDateControl::input ( )
inline

Returns internal input box

◆ preferredHeight()

void sptk::CDateControl::preferredHeight ( int &  h)

Computes the best size for the control

Parameters
hint&, control height

◆ preferredSize()

void sptk::CDateControl::preferredSize ( int &  w,
int &  h,
int &  editorWidth,
int &  buttonWidth 
)

Computes the best size for the control

Parameters
wint&, control width
hint&, control height
editorWidthint& the width of date input
buttonWidthint& the width of button

◆ resize()

void sptk::CDateControl::resize ( int  x,
int  y,
int  w,
int  h 
)
override

Resizes the control.

Parameters
xint, x-position
yint, y-position
wint, width
hint, height

The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:34: SPTK 5.4.1