ObjGUI  Check-in [b5835e0a2f]

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: b5835e0a2f6f61692eb82c20c33f099cf1ffbb1e24fe8be262108d77e8eaac89
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
47
48
49
50
51
52
53
54
55
56
57
40
41
42
43
44
45
46










47







-
-
-
-
-
-
-
-
-
-

	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)show
{
	gtk_widget_show_all(widget);
}

- (void)hide
{
	gtk_widget_hide(widget);
}
@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
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
41
42
43
44
45
46
47
48
49
50
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
}

- (void)show;
- (void)hide;
@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
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
53
54
55
56
57
58
59












60
61
62
63
64
65
66
67







-
-
-
-
-
-
-
-
-
-
-
-








  } @catch (id e) {
    [self release];
    @throw e;
  }

  return self;
}
//----------------------------------------------------------------------------------------------------------------------------------
- (void)show
{
  if(widget != NULL)
    ShowWindow(widget, SW_SHOWNORMAL);
}
//----------------------------------------------------------------------------------------------------------------------------------
- (void)hide
{
  if(widget != NULL)
    ShowWindow(widget, SW_HIDE);
}
//----------------------------------------------------------------------------------------------------------------------------------
- (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
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:)])