libxputty  0.1
A damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces
xlabel.h File Reference
#include "xputty.h"
Include dependency graph for xlabel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define XLABEL_H_
 

Functions

Widget_tadd_label (Widget_t *parent, const char *label, int x, int y, int width, int height)
 add_label - add a label to a Widget_t More...
 

Macro Definition Documentation

◆ XLABEL_H_

#define XLABEL_H_

Definition at line 19 of file xlabel.h.

Function Documentation

◆ add_label()

Widget_t* add_label ( Widget_t parent,
const char *  label,
int  x,
int  y,
int  width,
int  height 
)

add_label - add a label to a Widget_t

Parameters
*parent- pointer to the Widget_t request the label
*label- Label to show on the button
x,y,width,height- the position/geometry to create the label
Returns
Widget_t* - pointer to the Widget_t label struct

Definition at line 26 of file xlabel.c.

27  {
28 
29  Widget_t *wid = create_widget(parent->app, parent, x, y, width, height);
30  wid->label = label;
31  wid->scale.gravity = ASPECT;
33  return wid;
34 }

References _draw_label(), Widget_t::app, ASPECT, create_widget(), Func_t::expose_callback, Widget_t::func, Resize_t::gravity, Widget_t::label, and Widget_t::scale.

Resize_t::gravity
Gravity gravity
Definition: xwidget.h:192
create_widget
Widget_t * create_widget(Xputty *app, Widget_t *win, int x, int y, int width, int height)
*create_widget - create a widget A Widget_t could only be created as child of a other Widget_t To...
Definition: xwidget.c:268
Func_t::expose_callback
xevfunc expose_callback
Definition: xwidget.h:80
Widget_t::scale
Resize_t scale
Definition: xwidget.h:356
Widget_t::app
Xputty * app
Definition: xwidget.h:300
Widget_t
Widget_t - struct to hold the basic Widget_t info.
Definition: xwidget.h:298
ASPECT
@ ASPECT
Definition: xwidget.h:167
Widget_t::func
Func_t func
Definition: xwidget.h:310
Widget_t::label
const char * label
Definition: xwidget.h:326
_draw_label
void _draw_label(void *w_, void *user_data)
_draw_label - internal draw the label to the buffer
Definition: xlabel_private.c:25