#include <assert.h>
#include <string.h>
#include "TabViewItem.h"
Go to the source code of this file.
◆ _Class
◆ _TabViewItem()
Class * _TabViewItem |
( |
void |
| ) |
|
Definition at line 121 of file TabViewItem.c.
121 {
122 static Class *clazz;
123 static Once once;
124
125 do_once(&once, {
126 clazz = _initialize(&(const ClassDef) {
127 .name = "TabViewItem",
128 .superclass = _Object(),
130 .interfaceOffset = offsetof(
TabViewItem, interface),
131 .interfaceSize = sizeof(TabViewItemInterface),
133 });
134 });
135
136 return clazz;
137}
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 36 of file TabViewItem.c.
36 {
37
39
40 free(this->identifier);
41
42 release(this->label);
43 release(this->view);
44
46}
static void dealloc(Object *self)
◆ initialize()
static void initialize |
( |
Class * |
clazz | ) |
|
|
static |
- See also
- Class::initialize(Class *)
Definition at line 108 of file TabViewItem.c.
108 {
109
110 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
111
113 ((TabViewItemInterface *) clazz->interface)->initWithView =
initWithView;
115}
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.
TableColumn * initWithIdentifier(TableColumn *self, const char *identifier)
Initializes this TableColumn with the given identifier.
◆ initWithIdentifier()
Definition at line 54 of file TabViewItem.c.
54 {
55
57 if (self) {
60
63
66
68 }
69
70 return self;
71}
Box * initWithFrame(Box *self, const SDL_Rect *frame)
Initializes this Box with the given frame.
CollectionView * init(CollectionView *self, const SDL_Rect *frame)
Initializes this CollectionView with the specified frame and style.
Labels provide a configurable container for Text.
Label * initWithText(Label *self, const char *text, Font *font)
Initializes this Label with the given text and Font.
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 77 of file TabViewItem.c.
77 {
78
80 if (self) {
82 self->
view = retain(view);
83 }
84
85 return self;
86}
char * identifier
An optional identifier.
◆ setState()
Definition at line 92 of file TabViewItem.c.
92 {
93
95
98 } else {
100 }
101}
int state
The bit mask of TabState.
void addClassName(View *self, const char *className)
Adds the given class name to this View.
void removeClassName(View *self, const char *className)
Removes the given class name to this View.