gwenhywfar  5.10.1
w_hspacer.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 static GWENHYWFAR_CB
16  int index,
17  int value,
18  int doSignal) {
19  CocoaSpacer *hSpacer;
20 
22  assert(hSpacer);
23 
24  switch(prop) {
26  return 0;
27 
29  return 0;
30 
31  default:
32  break;
33  }
34 
36  "Function is not appropriate for this type of widget (%s)",
38  return GWEN_ERROR_INVALID;
39 }
40 
41 
42 
43 
44 static GWENHYWFAR_CB
47  int index,
48  int defaultValue) {
49  CocoaSpacer *hSpacer;
50 
52  assert(hSpacer);
53 
54  switch(prop) {
56  return 1;
57 
59  return 0;
60 
61  default:
62  break;
63  }
64 
66  "Function is not appropriate for this type of widget (%s)",
68  return defaultValue;
69 }
70 
71 
72 
74  CocoaSpacer *hSpacer;
75  uint32_t flags;
76  GWEN_WIDGET *wParent;
77 
78  flags=GWEN_Widget_GetFlags(w);
79  wParent=GWEN_Widget_Tree_GetParent(w);
80 
81  hSpacer = [[[CocoaSpacer alloc] initWithFrame:NSMakeRect(0.0, 0.0, 10.0, 10.0)] autorelease];
83  hSpacer.fillX = YES;
84  if (flags & GWEN_WIDGET_FLAGS_FILLY) hSpacer.fillY = YES;
85 
88 
91 
92  if (wParent)
94 
95  return 0;
96 }
97 
98 
GWEN_WIDGET_TYPE GWEN_Widget_GetType(const GWEN_WIDGET *w)
Definition: widget.c:185
#define COCOA_DIALOG_WIDGET_REAL
#define GWEN_ERROR_INVALID
Definition: error.h:67
GWEN_DIALOG_PROPERTY
Definition: dialog.h:260
int CocoaGui_WHSpacer_Setup(GWEN_WIDGET *w)
Definition: w_hspacer.mm:73
uint32_t GWEN_Widget_GetFlags(const GWEN_WIDGET *w)
Definition: widget.c:149
#define DBG_WARN(dbg_logger, format, args...)
Definition: debug.h:125
#define GWEN_LOGDOMAIN
Definition: logger.h:35
void GWEN_Widget_SetImplData(GWEN_WIDGET *w, int index, void *ptr)
Store a pointer with the widget.
Definition: widget.c:136
GWEN_WIDGET_GETINTPROPERTY_FN GWEN_Widget_SetGetIntPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_GETINTPROPERTY_FN fn)
Definition: widget.c:702
void * GWEN_Widget_GetImplData(const GWEN_WIDGET *w, int index)
Definition: widget.c:122
#define GWENHYWFAR_CB
Definition: gwenhywfarapi.h:89
GWEN_WIDGET_SETINTPROPERTY_FN GWEN_Widget_SetSetIntPropertyFn(GWEN_WIDGET *w, GWEN_WIDGET_SETINTPROPERTY_FN fn)
Definition: widget.c:687
#define COCOA_DIALOG_WIDGET_CONTENT
static GWENHYWFAR_CB int CocoaGui_WHSpacer_SetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition: w_hspacer.mm:14
struct GWEN_WIDGET GWEN_WIDGET
Definition: widget_be.h:34
int GWEN_Widget_AddChildGuiWidget(GWEN_WIDGET *w, GWEN_WIDGET *wChild)
Definition: widget.c:828
#define GWEN_WIDGET_FLAGS_FILLY
Definition: dialog.h:62
#define GWEN_WIDGET_FLAGS_FILLX
Definition: dialog.h:61
static GWENHYWFAR_CB int CocoaGui_WHSpacer_GetIntProperty(GWEN_WIDGET *w, GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
Definition: w_hspacer.mm:45
void GWEN_Widget_AddFlags(GWEN_WIDGET *w, uint32_t fl)
Definition: widget.c:167
const char * GWEN_Widget_Type_toString(GWEN_WIDGET_TYPE t)
Definition: widget.c:452