Overview
Comment: | Move -[show] and -[hide] from OGWidget to OGWindow. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b5835e0a2f6f61692eb82c20c33f099c |
User & Date: | js on 2012-01-08 14:03:23 |
Other Links: | manifest | tags |
Context
2012-01-08
| ||
14:06 | Move declaration of og_application_delegate() to the header. check-in: 8df3bb5437 user: js tags: trunk | |
14:03 | Move -[show] and -[hide] from OGWidget to OGWindow. check-in: b5835e0a2f user: js tags: trunk | |
2012-01-07
| ||
21:20 | Fix a missing include. check-in: e419b16fa3 user: js tags: trunk | |
Changes
Modified gtk/OGWidget.m from [eeba73ecfb] to [dd77474386].
︙ | ︙ | |||
40 41 42 43 44 45 46 | } @catch (id e) { [self release]; @throw e; } return self; } | < < < < < < < < < < | 40 41 42 43 44 45 46 47 | } @catch (id e) { [self release]; @throw e; } return self; } @end |
Modified gtk/OGWindow.m from [5af39778f2] to [be61752dfa].
︙ | ︙ | |||
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | dimension.width, dimension.height); } - (void)addChild: (OGWidget*)child { gtk_container_add(GTK_CONTAINER(widget), child->widget); } - (BOOL)OG_willClose { OFAutoreleasePool *pool = [OFAutoreleasePool new]; if ([delegate respondsToSelector: @selector(windowWillClose:)]) return [delegate windowWillClose: self]; [pool release]; return YES; } @end | > > > > > > > > > > | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | dimension.width, dimension.height); } - (void)addChild: (OGWidget*)child { gtk_container_add(GTK_CONTAINER(widget), child->widget); } - (void)show { gtk_widget_show_all(widget); } - (void)hide { gtk_widget_hide(widget); } - (BOOL)OG_willClose { OFAutoreleasePool *pool = [OFAutoreleasePool new]; if ([delegate respondsToSelector: @selector(windowWillClose:)]) return [delegate windowWillClose: self]; [pool release]; return YES; } @end |
Modified headers/OGWidget.h from [563c683763] to [13a21a6fd6].
︙ | ︙ | |||
34 35 36 37 38 39 40 | @public #if defined(OG_GTK) GtkWidget *widget; #elif defined(OG_WIN32) HWND widget; #endif } | < < < | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | @public #if defined(OG_GTK) GtkWidget *widget; #elif defined(OG_WIN32) HWND widget; #endif } @end #if defined(OG_GTK) extern void og_destroy(GtkWidget*, OGWidget*); #elif defined(OG_WIN32) extern void og_destroy(HWND widget, OGWidget *object); #endif |
Modified headers/OGWindow.h from [ca5acb8c01] to [26db441951].
︙ | ︙ | |||
37 38 39 40 41 42 43 44 | @property (assign) id <OGWindowDelegate> delegate; @property (copy) OFString *title; @property (assign) of_point_t position; @property (assign) of_dimension_t dimension; + window; - (void)addChild: (OGWidget*)widget; @end | > > | 37 38 39 40 41 42 43 44 45 46 | @property (assign) id <OGWindowDelegate> delegate; @property (copy) OFString *title; @property (assign) of_point_t position; @property (assign) of_dimension_t dimension; + window; - (void)addChild: (OGWidget*)widget; - (void)show; - (void)hide; @end |
Modified win32/OGWidget.m from [5d653bdf90] to [d14a1cabbc].
︙ | ︙ | |||
53 54 55 56 57 58 59 | } @catch (id e) { [self release]; @throw e; } return self; } | < < < < < < < < < < < < | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | } @catch (id e) { [self release]; @throw e; } return self; } //---------------------------------------------------------------------------------------------------------------------------------- - (int)MessageReceived : (HWND)hwnd : (UINT)msg : (WPARAM)wparam : (LPARAM)lparam { return DefWindowProc(hwnd, msg, wparam, lparam); } //---------------------------------------------------------------------------------------------------------------------------------- @end //================================================================================================================================== |
Modified win32/OGWindow.m from [9cad780e9f] to [9c501d35d1].
︙ | ︙ | |||
118 119 120 121 122 123 124 125 126 127 128 129 130 131 | { SetParent(child->widget, widget); //act like GTK; we'll assume a single child, and expand it to our size RECT rc; GetClientRect(widget, &rc); SetWindowPos(child->widget, NULL, 0, 0, rc.right, rc.bottom, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); } //---------------------------------------------------------------------------------------------------------------------------------- - (BOOL)OG_willClose { OFAutoreleasePool *pool = [OFAutoreleasePool new]; if ([delegate respondsToSelector: @selector(windowWillClose:)]) | > > > > > > > > > > > > | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | { SetParent(child->widget, widget); //act like GTK; we'll assume a single child, and expand it to our size RECT rc; GetClientRect(widget, &rc); SetWindowPos(child->widget, NULL, 0, 0, rc.right, rc.bottom, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); } //---------------------------------------------------------------------------------------------------------------------------------- - (void)show { if(widget != NULL) ShowWindow(widget, SW_SHOWNORMAL); } //---------------------------------------------------------------------------------------------------------------------------------- - (void)hide { if(widget != NULL) ShowWindow(widget, SW_HIDE); } //---------------------------------------------------------------------------------------------------------------------------------- - (BOOL)OG_willClose { OFAutoreleasePool *pool = [OFAutoreleasePool new]; if ([delegate respondsToSelector: @selector(windowWillClose:)]) |
︙ | ︙ |