+2006-10-30 Jonathan Pobst <monkey@jpobst.com>
+
+ * XplatUI.cs, XplatUIDriver.cs, XplatUIWin32.cs, XplatUIOSX.cs,
+ XplatUIX11.cs: Remove old 2 parameter SetVisible.
+
+ * Control.cs: Use the new 3 parameter SetVisible with activate = true.
+
2006-10-30 Jonathan Pobst <monkey@jpobst.com>
* XplatUI.cs, XplatUIDriver.cs, XplatUIWin32.cs: Add an overload
creator_thread = Thread.CurrentThread;
XplatUI.EnableWindow(window.Handle, is_enabled);
- XplatUI.SetVisible(window.Handle, is_visible);
+ XplatUI.SetVisible(window.Handle, is_visible, true);
if (clip_region != null) {
XplatUI.SetClipRegion(Handle, clip_region);
is_visible=value;
if (IsHandleCreated) {
- XplatUI.SetVisible(Handle, value);
+ XplatUI.SetVisible(Handle, value, true);
// Explicitly move Toplevel windows to where we want them;
// apparently moving unmapped toplevel windows doesn't work
if (is_visible && (this is Form)) {
return driver.SetTopmost(handle, hWndOwner, Enabled);
}
- internal static bool SetVisible(IntPtr handle, bool visible) {
- #if DriverDebug || DriverDebugState
- Console.WriteLine("SetVisible({0}, {1}): Called", Window(handle), visible);
- #endif
- return driver.SetVisible(handle, visible);
- }
-
internal static bool SetVisible (IntPtr handle, bool visible, bool activate)
{
#if DriverDebug || DriverDebugState
internal abstract bool GetText(IntPtr handle, out string text);
internal abstract bool Text(IntPtr handle, string text);
- internal abstract bool SetVisible(IntPtr handle, bool visible);
internal abstract bool SetVisible(IntPtr handle, bool visible, bool activate);
internal abstract bool IsVisible(IntPtr handle);
internal abstract bool IsEnabled(IntPtr handle);
}
- internal override bool SetVisible(IntPtr handle, bool visible) {
+ internal override bool SetVisible(IntPtr handle, bool visible, bool activate) {
Hwnd hwnd = Hwnd.ObjectFromHandle (handle);
object window = WindowMapping [hwnd.Handle];
if (window != null)
hwnd.visible = visible;
return true;
}
-
- internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
- {
- return SetVisible (handle, visible);
- }
internal override void SetBorderStyle(IntPtr handle, FormBorderStyle border_style) {
Hwnd hwnd;
return true;
}
- internal override bool SetVisible(IntPtr handle, bool visible) {
- if (visible) {
- if (Control.FromHandle(handle) is Form) {
- Form f;
-
- f = (Form)Control.FromHandle(handle);
- switch (f.WindowState) {
- case FormWindowState.Normal: Win32ShowWindow(handle, WindowPlacementFlags.SW_SHOWNORMAL); break;
- case FormWindowState.Minimized: Win32ShowWindow(handle, WindowPlacementFlags.SW_MINIMIZE); break;
- case FormWindowState.Maximized: Win32ShowWindow(handle, WindowPlacementFlags.SW_MAXIMIZE); break;
- }
- } else {
- Win32ShowWindow(handle, WindowPlacementFlags.SW_SHOWNORMAL);
- }
- } else {
- Win32ShowWindow(handle, WindowPlacementFlags.SW_HIDE);
- }
- return true;
- }
-
internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
{
if (visible) {
}
}
else
- SetVisible (handle, c.Visible);
+ SetVisible (handle, c.Visible, true);
return Win32SetParent(handle, parent);
}
return true;
}
- internal override bool SetVisible(IntPtr handle, bool visible) {
+ internal override bool SetVisible(IntPtr handle, bool visible, bool activate) {
Hwnd hwnd;
hwnd = Hwnd.ObjectFromHandle(handle);
return true;
}
- internal override bool SetVisible (IntPtr handle, bool visible, bool activate)
- {
- return SetVisible (handle, visible);
- }
-
internal override void SetWindowMinMax(IntPtr handle, Rectangle maximized, Size min, Size max) {
Hwnd hwnd;
XSizeHints hints;