#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "TabViewItem.h"
Go to the source code of this file.
◆ _Class
◆ _TabViewItem()
| Class * _TabViewItem |
( |
void |
| ) |
|
Definition at line 122 of file TabViewItem.c.
122 {
123 static Class *clazz;
124 static Once once;
125
126 do_once(&once, {
127 clazz = _initialize(&(const ClassDef) {
128 .name = "TabViewItem",
129 .superclass = _Object(),
131 .interfaceOffset = offsetof(
TabViewItem, interface),
132 .interfaceSize = sizeof(TabViewItemInterface),
134 });
135 });
136
137 return clazz;
138}
static void initialize(Class *clazz)
TabViewItems embed Views in a TabView.
◆ dealloc()
| static void dealloc |
( |
Object * |
self | ) |
|
|
static |
- See also
- Object::dealloc(Object *)
Definition at line 37 of file TabViewItem.c.
37 {
38
40
41 free(this->identifier);
42
43 release(this->label);
44 release(this->view);
45
47}
static void dealloc(Object *self)
◆ initialize()
| static void initialize |
( |
Class * |
clazz | ) |
|
|
static |
- See also
- Class::initialize(Class *)
Definition at line 109 of file TabViewItem.c.
109 {
110
111 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
112
116}
static void setState(TabViewItem *self, int state)
static TabViewItem * initWithView(TabViewItem *self, View *view)
static TabViewItem * initWithIdentifier(TabViewItem *self, const char *identifier)
setState(TabViewItem *self, int state)
Sets this TabViewItem's state, which may alter its appearance.
TabViewItem * initWithView(TabViewItem *self, View *view)
Initializes this TabViewItem with the specified View.
◆ initWithIdentifier()
Definition at line 55 of file TabViewItem.c.
55 {
56
58 if (self) {
61
64
67
69 }
70
71 return self;
72}
static View * init(View *self)
static Box * initWithFrame(Box *self, const SDL_Rect *frame)
static Label * initWithText(Label *self, const char *text, Font *font)
Labels provide a configurable container for Text.
View * view
The View this TabViewItem embeds.
Label * label
The Label used to select this tab.
char * identifier
The identifier.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
◆ initWithView()
Definition at line 78 of file TabViewItem.c.
78 {
79
81 if (self) {
83 self->
view = retain(view);
84 }
85
86 return self;
87}
char * identifier
An optional identifier.
◆ setState()
Definition at line 93 of file TabViewItem.c.
93 {
94
96
99 } else {
101 }
102}
static void removeClassName(View *self, const char *className)
static void addClassName(View *self, const char *className)
int state
The bit mask of TabState.