gwenhywfar 5.14.1
w_vspacer.mm
Go to the documentation of this file.
1/***************************************************************************
2 begin : Aug 17 2010
3 copyright : (C) 2010 by Samuel Strupp
4
5 ***************************************************************************
6 * Please see toplevel file COPYING for license details *
7 ***************************************************************************/
8
9
10#import "CocoaSpacer.h"
11
12
13
14static GWENHYWFAR_CB
17 int index,
18 int value,
19 int doSignal) {
20 CocoaSpacer *vSpacer;
21
23 assert(vSpacer);
24
25 switch(prop) {
27 return 0;
28
30 return 0;
31
32 default:
33 break;
34 }
35
37 "Function is not appropriate for this type of widget (%s)",
39 return GWEN_ERROR_INVALID;
40}
41
42
43
44
45static GWENHYWFAR_CB
48 int index,
49 int defaultValue) {
50 CocoaSpacer *vSpacer;
51
53 assert(vSpacer);
54
55 switch(prop) {
57 return 1;
58
60 return 0;
61
62 default:
63 break;
64 }
65
67 "Function is not appropriate for this type of widget (%s)",
69 return defaultValue;
70}
71
72
73
75 CocoaSpacer *vSpacer;
76 uint32_t flags;
77 GWEN_WIDGET *wParent;
78
79 flags=GWEN_Widget_GetFlags(w);
80 wParent=GWEN_Widget_Tree_GetParent(w);
81
82 vSpacer = [[[CocoaSpacer alloc] initWithFrame:NSMakeRect(0.0, 0.0, 10.0, 10.0)] autorelease];
84 vSpacer.fillY = YES;
85 if (flags & GWEN_WIDGET_FLAGS_FILLX) vSpacer.fillX = YES;
86
87
90
93
94 if (wParent)
96
97 return 0;
98}
99
100
#define COCOA_DIALOG_WIDGET_REAL
#define COCOA_DIALOG_WIDGET_CONTENT
#define DBG_WARN(dbg_logger, format,...)
Definition debug.h:125
#define GWEN_WIDGET_FLAGS_FILLY
Definition dialog.h:62
#define GWEN_WIDGET_FLAGS_FILLX
Definition dialog.h:61
GWEN_DIALOG_PROPERTY
Definition dialog.h:260
@ GWEN_DialogProperty_Enabled
Definition dialog.h:267
@ GWEN_DialogProperty_Focus
Definition dialog.h:276
#define GWEN_ERROR_INVALID
Definition error.h:67
#define GWENHYWFAR_CB
#define GWEN_LOGDOMAIN
Definition logger.h:32
static GWENHYWFAR_CB int CocoaGui_WVSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition w_vspacer.mm:15
int CocoaGui_WVSpacer_Setup(GWEN_WIDGET *w)
Definition w_vspacer.mm:74
static GWENHYWFAR_CB int CocoaGui_WVSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition w_vspacer.mm:46
GWEN_WIDGET_GETINTPROPERTY_FN GWEN_Widget_SetGetIntPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_GETINTPROPERTY_FN fn)
Definition widget.c:710
int GWEN_Widget_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition widget.c:836
void GWEN_Widget_SetImplData(GWEN_WIDGET *w, int index, void *ptr)
Store a pointer with the widget.
Definition widget.c:136
void * GWEN_Widget_GetImplData(const GWEN_WIDGET *w, int index)
Definition widget.c:122
GWEN_WIDGET_SETINTPROPERTY_FN GWEN_Widget_SetSetIntPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_SETINTPROPERTY_FN fn)
Definition widget.c:695
void GWEN_Widget_AddFlags(GWEN_WIDGET *w, uint32_t fl)
Definition widget.c:167
uint32_t GWEN_Widget_GetFlags(const GWEN_WIDGET *w)
Definition widget.c:149
const char * GWEN_Widget_Type_toString(GWEN_WIDGET_TYPE t)
Definition widget.c:456
GWEN_WIDGET_TYPE GWEN_Widget_GetType(const GWEN_WIDGET *w)
Definition widget.c:185
struct GWEN_WIDGET GWEN_WIDGET
Definition widget_be.h:34