ui/cocoa/window.m

changeset 869
6b7a178cff7c
parent 864
d39301e8f962
child 870
e167cf006213
equal deleted inserted replaced
868:be3df094f8db 869:6b7a178cff7c
42 #include "../common/toolbar.h" 42 #include "../common/toolbar.h"
43 #include "../common/object.h" 43 #include "../common/object.h"
44 44
45 #include <cx/mempool.h> 45 #include <cx/mempool.h>
46 46
47 static int window_default_width = 650;
48 static int window_default_height = 550;
49
50 static int splitview_window_default_pos = -1;
51 static UiBool splitview_window_use_prop = TRUE;
47 52
48 static UiObject* create_window(const char *title, BOOL simple, BOOL sidebar, BOOL splitview) { 53 static UiObject* create_window(const char *title, BOOL simple, BOOL sidebar, BOOL splitview) {
49 UiObject *obj = uic_object_new_toplevel(); 54 UiObject *obj = uic_object_new_toplevel();
50 55
51 MainWindow *window = [[MainWindow alloc] init:obj withSidebar:sidebar withSplitview:splitview]; 56 MainWindow *window = [[MainWindow alloc] init:obj withSidebar:sidebar withSplitview:splitview];
80 return obj; 85 return obj;
81 } 86 }
82 87
83 UiObject* ui_splitview_window(const char *title, UiBool sidebar) { 88 UiObject* ui_splitview_window(const char *title, UiBool sidebar) {
84 return create_window(title, FALSE, sidebar, TRUE); 89 return create_window(title, FALSE, sidebar, TRUE);
90 }
91
92 void ui_window_size(UiObject *obj, int width, int height) {
93 // TODO
94 }
95
96 void ui_window_default_size(int width, int height) {
97 window_default_width = width;
98 window_default_height = height;
85 } 99 }
86 100
87 /* --------------------------------- File Dialogs --------------------------------- */ 101 /* --------------------------------- File Dialogs --------------------------------- */
88 102
89 void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata) { 103 void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata) {

mercurial