1cdk_objs(3)                Library Functions Manual                cdk_objs(3)
2
3
4

NAME

6       cdk_objs - Cdk object-support functions
7

SYNOPSIS

9       cc [ flag ... ] file ...  -lcdk [ library ... ]
10
11       void cleanCdkTitle (
12                      CDKOBJS *obj);
13
14       void drawCdkTitle (
15                      WINDOW *window,
16                      CDKOBJS *object);
17
18       char * getCdkTitle (
19                      CDKOBJS *obj);
20
21       void positionCDKObject (
22                      CDKOBJS *object,
23                      WINDOW *win);
24
25       void setCDKObjectBackgroundColor (
26                      CDKOBJS *object,
27                      const 3char *color);
28
29       void setCDKObjectPostProcess (
30                      CDKOBJS *object,
31                      PROCESSFN func,
32                      void *data);
33
34       void setCDKObjectPreProcess (
35                      CDKOBJS *object,
36                      PROCESSFN func,
37                      void *data);
38
39       void setCdkExitType(
40                      CDKOBJS *obj,
41                      EExitType *type,
42                      chtyp ch);
43
44       int setCdkTitle (
45                      CDKOBJS *obj,
46                      const char *title,
47                      int boxWidth);
48
49       bool validCDKObject (
50                      CDKOBJS *obj);
51

DESCRIPTION

53       Cdk  is  written in ANSI C, which has "no" object support.  Most of the
54       object support in Cdk is done using macros and a small number of  types
55       which hold object information:
56
57            CDKFUNCS
58                 contains the function pointers for common methods of the wid‐
59                 gets.  It is separate from CDKOBJS  because  it  is  compiled
60                 into  each  widget's  C code (see the DeclareCDKObjects() and
61                 DeclareSetXXchar() macros.  The widget instances point  to  a
62                 single copy of CDKFUNCS for each widget.
63
64            CDKOBJS
65                 Holds  data  common  to  all  objects (widget instances).  It
66                 appears first in each widget's struct to  allow  Cdk  to  use
67                 generic functions in binding.c, cdkscreen.c, position.c, etc.
68
69

AVAILABLE FUNCTIONS

71       The functions declared in <cdk/cdk_objs.h> are used in situations where
72       the expressions are too complex for a macro.
73
74       cleanCdkTitle
75            Remove storage for the widget's title.
76
77       drawCdkTitle,
78            Draw the widget's title.
79
80       getCdkTitle
81            Returns the widget's title as a string.   Colors  are  encoded  as
82            described  in  cdk_display(3).   The lines of text in a multi-line
83            title are separated by “<#10>” markers (an encoded newline).
84
85       positionCDKObject
86            This allows the user to use the cursor keys to adjust the position
87            of the widget.
88
89       setCDKObjectBackgroundColor
90            Set the background color of the widget.
91
92       setCDKObjectPostProcess
93            Set data for postprocessing.
94
95       setCDKObjectPreProcess
96            Set data for preprocessing.
97
98       setCdkExitType
99            Set  the  object's  exit-type  based  on the input.  The .exitType
100            field should have been part of the CDKOBJS struct, but it is  used
101            too pervasively in Cdk4 applications to move.
102
103       setCdkTitle
104            Set the widget's title.
105
106       validCDKObject
107            Returns true if a "new" was done on the object but no "destroy".
108

SEE ALSO

110       cdk_binding(3), cdk_display(3), cdk_process(3).
111
112
113
114                                                                   cdk_objs(3)
Impressum