#include <assert.h>
#include "TabViewController.h"
Go to the source code of this file.
◆ _Class
◆ _TabViewController()
Class * _TabViewController |
( |
void |
| ) |
|
Definition at line 148 of file TabViewController.c.
148 {
149 static Class *clazz;
150 static Once once;
151
152 do_once(&once, {
153 clazz = _initialize(&(const ClassDef) {
154 .name = "TabViewController",
158 .interfaceSize = sizeof(TabViewControllerInterface),
160 });
161 });
162
163 return clazz;
164}
static void initialize(Class *clazz)
TabViewControllers arrange and manage their child ViewControllers in a tab view interface.
Class * _ViewController(void)
The ViewController archetype.
◆ addChildViewController()
- See also
- ViewController::addChildViewController(ViewController *, ViewController *)
Definition at line 68 of file TabViewController.c.
68 {
69
71
73
75
76 $(this->tabView,
addTab, tab);
77
78 release(tab);
79}
void addTab(TabView *self, TabViewItem *tab)
Adds the specified TabViewItem to this TabView.
TabViewItems embed Views in a TabView.
TabViewItem * initWithView(TabViewItem *self, View *view)
Initializes this TabViewItem with the specified View.
A ViewController manages a View and its descendants.
View * view
The main view.
void addChildViewController(ViewController *self, ViewController *childViewController)
Adds the specified child ViewController to this ViewController.
◆ dealloc()
static void dealloc |
( |
Object * |
self | ) |
|
|
static |
- See also
- Object::dealloc(Object *)
Definition at line 35 of file TabViewController.c.
35 {
36
38
39 release(this->tabView);
40
42}
static void dealloc(Object *self)
◆ init()
Definition at line 101 of file TabViewController.c.
101 {
103}
CollectionView * init(CollectionView *self, const SDL_Rect *frame)
Initializes this CollectionView with the specified frame and style.
◆ initialize()
static void initialize |
( |
Class * |
clazz | ) |
|
|
static |
- See also
- Class::initialize(Class *)
Definition at line 132 of file TabViewController.c.
132 {
133
134 ((ObjectInterface *) clazz->interface)->dealloc =
dealloc;
135
136 ((ViewControllerInterface *) clazz->interface)->loadView =
loadView;
139
140 ((TabViewControllerInterface *) clazz->interface)->init =
init;
142}
TabViewItem * tabForViewController(const TabViewController *self, const ViewController *viewController)
Returns the TabViewItem for the specified child ViewController, or NULL.
void loadView(ViewController *self)
Loads this ViewController's View.
void removeChildViewController(ViewController *self, ViewController *childViewController)
Removes the specified child ViewController from this ViewController.
◆ loadView()
- See also
- ViewController::loadView(ViewController *)
Definition at line 49 of file TabViewController.c.
49 {
50
52
54
56
58 assert(this->tabView);
59
60 this->tabView->delegate.self = this;
61
63}
@ ViewAutoresizingContain
Box * initWithFrame(Box *self, const SDL_Rect *frame)
Initializes this Box with the given frame.
TabViews allow for the display of multiple pages of information within a single view.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.
void addSubview(View *self, View *subview)
Adds a subview to this view, to be drawn above its siblings.
int autoresizingMask
The ViewAutoresizing bitmask.
◆ removeChildViewController()
◆ tabForViewController()
Definition at line 116 of file TabViewController.c.
116 {
117
118 assert(viewController);
119
120 if (viewController->
view) {
122 }
123
124 return NULL;
125}
static _Bool tabForViewController_predicate(const ident obj, ident data)
Predicate for tabViewItemFor.
TabView * tabView
The TabView.
MutableArray * tabs
The TabViewItems.
◆ tabForViewController_predicate()
static _Bool tabForViewController_predicate |
( |
const ident |
obj, |
|
|
ident |
data |
|
) |
| |
|
static |