ui/cocoa/window.m

changeset 113
dde28a806552
parent 112
c3f2f16fa4b8
equal deleted inserted replaced
112:c3f2f16fa4b8 113:dde28a806552
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];
79 obj->window = window_data; 84 obj->window = window_data;
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) {
89 sleep(1);
84 return create_window(title, FALSE, sidebar, TRUE); 90 return create_window(title, FALSE, sidebar, TRUE);
91 }
92
93 void ui_window_size(UiObject *obj, int width, int height) {
94 // TODO
95 }
96
97 void ui_window_default_size(int width, int height) {
98 window_default_width = width;
99 window_default_height = height;
85 } 100 }
86 101
87 /* --------------------------------- File Dialogs --------------------------------- */ 102 /* --------------------------------- File Dialogs --------------------------------- */
88 103
89 void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata) { 104 void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata) {

mercurial