\twocolitem{\helpref{wxEvent}{wxevent}}{The event base class}
\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{A window focus event}
\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress event}
+\twocolitem{\helpref{wxIconizeEvent}{wxiconizeevent}}{An iconize/restore event}
\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{An idle event}
\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{A dialog initialisation event}
\twocolitem{\helpref{wxJoystickEvent}{wxjoystickevent}}{A joystick event}
\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event}
+\twocolitem{\helpref{wxMaximizeEvent}{wxmaximizeevent}}{A maximize event}
\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event}
\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event}
\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event}
\func{void}{Iconize}{\param{bool}{ iconize}}
-Iconizes or restores the frame. Windows only.
+Iconizes or restores the frame.
\wxheading{Parameters}
\constfunc{bool}{IsIconized}{\void}
-Returns TRUE if the frame is iconized. Windows only.
+Returns TRUE if the frame is iconized.
\membersection{wxFrame::IsMaximized}\label{wxframeismaximized}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: sizeevt.tex
+%% Purpose: wxSizeEvent and related event classes documentation
+%% Author: wxWindows team
+%% Modified by:
+%% Created:
+%% RCS-ID: $Id$
+%% Copyright: (c) wxWindows team
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% wxSizeEvent
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\section{\class{wxSizeEvent}}\label{wxsizeevent}
A size event holds information about size change events.
\wxheading{See also}
-\helpref{wxWindow::OnSize}{wxwindowonsize}, \helpref{wxSize}{wxsize}, \helpref{Event handling overview}{eventhandlingoverview}
+\helpref{wxSize}{wxsize},\rtfsp
+\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
Returns the entire size of the window generating the size change event.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% wxIconizeEvent
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxIconizeEvent}}\label{wxiconizeevent}
+
+An event being sent when the frame is iconized (minimized) or restored.
+
+Currently only wxMSW and wxGTK generate such events.
+
+\wxheading{Derived from}
+
+\helpref{wxEvent}{wxevent}\\
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/event.h>
+
+\wxheading{Event table macros}
+
+To process an iconize event, use this event handler macro to direct input to a
+member function that takes a wxIconizeEvent argument.
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf EVT\_ICONIZE(func)}}{Process a wxEVT\_ICONIZE event.}
+\end{twocollist}%
+
+\wxheading{See also}
+
+\helpref{Event handling overview}{eventhandlingoverview},\rtfsp
+\helpref{wxFrame::Iconize}{wxframeiconize},\rtfsp
+\helpref{wxFrame::IsIconized}{wxframeisiconized}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxIconizeEvent::wxIconizeEvent}\label{wxiconizeeventctor}
+
+\func{}{wxIconizeEvent}{\param{int }{id = 0}, \param{bool }{iconized = TRUE}}
+
+Constructor.
+
+\membersection{wxIconizeEvent::Iconized}\label{wxiconizeeventiconized}
+
+\constfunc{bool}{Iconized}{\void}
+
+Returns {\tt TRUE} if the frame has been iconized, {\tt FALSE} if it has been
+restored.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% wxMaximizeEvent
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxMaximizeEvent}}\label{wxmaximizeevent}
+
+An event being sent when the frame is maximized (minimized) or restored.
+
+\wxheading{Derived from}
+
+\helpref{wxEvent}{wxevent}\\
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/event.h>
+
+\wxheading{Event table macros}
+
+To process a maximize event, use this event handler macro to direct input to a
+member function that takes a wxMaximizeEvent argument.
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf EVT\_MAXIMIZE(func)}}{Process a wxEVT\_MAXIMIZE event.}
+\end{twocollist}%
+
+\wxheading{See also}
+
+\helpref{Event handling overview}{eventhandlingoverview},\rtfsp
+\helpref{wxFrame::Maximize}{wxframemaximize},\rtfsp
+\helpref{wxFrame::IsMaximized}{wxframeismaximized}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxMaximizeEvent::wxMaximizeEvent}\label{wxmaximizeeventctor}
+
+\func{}{wxMaximizeEvent}{\param{int }{id = 0}}
+
+Constructor.
+
class WXDLLEXPORT wxShowEvent : public wxEvent
{
- DECLARE_DYNAMIC_CLASS(wxShowEvent)
-
public:
-
wxShowEvent(int id = 0, bool show = FALSE)
{ m_eventType = wxEVT_SHOW; m_id = id; m_show = show; }
protected:
bool m_show;
+
+ DECLARE_DYNAMIC_CLASS(wxShowEvent)
};
/*
class WXDLLEXPORT wxIconizeEvent : public wxEvent
{
- DECLARE_DYNAMIC_CLASS(wxIconizeEvent)
-
public:
- wxIconizeEvent(int id = 0)
- { m_eventType = wxEVT_ICONIZE; m_id = id; }
+ wxIconizeEvent(int id = 0, bool iconized = TRUE)
+ { m_eventType = wxEVT_ICONIZE; m_id = id; m_iconized = iconized; }
+
+ // return true if the frame was iconized, false if restored
+ bool Iconized() const { return m_iconized; }
+
+protected:
+ bool m_iconized;
+
+ DECLARE_DYNAMIC_CLASS(wxIconizeEvent)
};
/*
class WXDLLEXPORT wxMaximizeEvent : public wxEvent
{
- DECLARE_DYNAMIC_CLASS(wxMaximizeEvent)
-
public:
- wxMaximizeEvent(int id = 0)
- { m_eventType = wxEVT_MAXIMIZE; m_id = id; }
+ wxMaximizeEvent(int id = 0)
+ { m_eventType = wxEVT_MAXIMIZE; m_id = id; }
+
+ DECLARE_DYNAMIC_CLASS(wxMaximizeEvent)
};
// Joystick event class
virtual void DoClientToScreen(int *x, int *y) const;
virtual void DoScreenToClient(int *x, int *y) const;
+ // send the iconize event, return TRUE if processed
+ bool SendIconizeEvent(bool iconized = TRUE);
+
// the frame icon
wxIcon m_icon;
// --------------------------
// move the window to the specified location and resize it: this is called
- // from both DoSetSize() and DoSetClientSize()
+ // from both DoSetSize() and DoSetClientSize()
virtual void DoMoveWindow(int x, int y, int width, int height);
-
+
// GTK callbacks
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
+ // do *not* call this to iconize the frame, this is a private function!
+ void SetIconizeState(bool iconic);
+
wxString m_title;
int m_miniEdge,
m_miniTitle;
bool m_toolBarDetached;
bool m_insertInClientArea; /* not from within OnCreateXXX */
- bool m_isIconized;
-
bool m_fsIsShowing; /* full screen */
long m_fsSaveStyle;
long m_fsSaveFlag;
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const;
+ // is the frame currently iconized?
+ bool m_isIconized;
+
private:
DECLARE_DYNAMIC_CLASS(wxFrame)
};
// --------------------------
// move the window to the specified location and resize it: this is called
- // from both DoSetSize() and DoSetClientSize()
+ // from both DoSetSize() and DoSetClientSize()
virtual void DoMoveWindow(int x, int y, int width, int height);
-
+
// GTK callbacks
virtual void GtkOnSize( int x, int y, int width, int height );
virtual void OnInternalIdle();
+ // do *not* call this to iconize the frame, this is a private function!
+ void SetIconizeState(bool iconic);
+
wxString m_title;
int m_miniEdge,
m_miniTitle;
bool m_toolBarDetached;
bool m_insertInClientArea; /* not from within OnCreateXXX */
- bool m_isIconized;
-
bool m_fsIsShowing; /* full screen */
long m_fsSaveStyle;
long m_fsSaveFlag;
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const;
+ // is the frame currently iconized?
+ bool m_isIconized;
+
private:
DECLARE_DYNAMIC_CLASS(wxFrame)
};
#endif // wxUSE_STATUSBAR
}
+bool wxFrameBase::SendIconizeEvent(bool iconized)
+{
+ wxIconizeEvent event(GetId(), iconized);
+ event.SetEventObject(this);
+
+ return GetEventHandler()->ProcessEvent(event);
+}
+
// ----------------------------------------------------------------------------
// status bar stuff
// ----------------------------------------------------------------------------
GdkEvent * WXUNUSED(event),
wxFrame *win )
{
- win->m_isIconized = FALSE;
+ win->SetIconizeState(FALSE);
}
//-----------------------------------------------------------------------------
GdkEvent * WXUNUSED(event),
wxFrame *win )
{
- win->m_isIconized = TRUE;
+ win->SetIconizeState(TRUE);
}
//-----------------------------------------------------------------------------
GtkPizza *pizza = GTK_PIZZA(widget);
gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
- GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1);
-
+ GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1);
+
return TRUE;
}
{
GtkPizza *pizza = GTK_PIZZA(widget);
- gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
- GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1);
+ gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1);
}
// ----------------------------------------------------------------------------
m_toolBarDetached = FALSE;
m_insertInClientArea = TRUE;
m_isFrame = TRUE;
- m_isIconized = FALSE;
+ m_isIconized = TRUE;
m_fsIsShowing = FALSE;
m_themeEnabled = TRUE;
}
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
-
+
if (style & wxFRAME_TOOL_WINDOW)
win_type = GTK_WINDOW_POPUP;
#endif
/* we donm't allow the frame to get the focus as otherwise
- the frame will grabit at arbitrary fcous changes. */
+ the frame will grab it at arbitrary focus changes. */
GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
if (m_parent) m_parent->AddChild( this );
if (show == m_fsIsShowing) return FALSE; // return what?
m_fsIsShowing = show;
-
+
if (show)
{
m_fsSaveStyle = m_windowStyle;
m_fsSaveFlag = style;
GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y );
GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height );
-
+
gtk_widget_hide( m_widget );
gtk_widget_unrealize( m_widget );
-
+
m_windowStyle = wxSIMPLE_BORDER;
-
+
int x;
int y;
wxDisplaySize( &x, &y );
SetSize( 0, 0, x, y );
-
+
gtk_widget_realize( m_widget );
gtk_widget_show( m_widget );
}
{
gtk_widget_hide( m_widget );
gtk_widget_unrealize( m_widget );
-
+
m_windowStyle = m_fsSaveStyle;
-
+
SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height );
-
+
gtk_widget_realize( m_widget );
gtk_widget_show( m_widget );
}
-
+
return TRUE;
}
{
return m_isIconized;
}
+
+void wxFrame::SetIconizeState(bool iconize)
+{
+ if ( iconize != m_isIconized )
+ {
+ m_isIconized = iconize;
+ (void)SendIconizeEvent(iconize);
+ }
+ else
+ {
+ // this is not supposed to happen if we're called only from
+ // gtk_frame_(un)map_callback!
+ wxFAIL_MSG( _T("unexpected call to SendIconizeEvent ignored") );
+ }
+}
+
pizza->height = 20;
pizza->bin_window = NULL;
-
+
pizza->xoffset = 0;
pizza->yoffset = 0;
pizza->clear_on_draw = clear;
}
-void
+void
gtk_pizza_set_filter (GtkPizza *pizza,
gboolean use)
{
g_return_if_fail (GTK_IS_PIZZA (pizza));
pizza->use_filter = use;
-}
-
-void
+}
+
+void
gtk_pizza_set_external (GtkPizza *pizza,
gboolean expose)
{
}
}
-gint
+gint
gtk_pizza_child_resized (GtkPizza *pizza,
GtkWidget *widget)
{
(child->height == widget->allocation.height));
}
}
-
+
return FALSE;
}
-
+
static void
gtk_pizza_map (GtkWidget *widget)
{
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
- attributes.event_mask =
- GDK_VISIBILITY_NOTIFY_MASK;
+ attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new(gtk_widget_get_parent_window (widget),
attributes.y = 0;
attributes.event_mask = gtk_widget_get_events (widget);
- attributes.event_mask |=
- GDK_EXPOSURE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_MOTION_MASK |
- GDK_BUTTON1_MOTION_MASK |
- GDK_BUTTON2_MOTION_MASK |
- GDK_BUTTON3_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_FOCUS_CHANGE_MASK;
+ attributes.event_mask |= GDK_EXPOSURE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_MOTION_MASK |
+ GDK_BUTTON1_MOTION_MASK |
+ GDK_BUTTON2_MOTION_MASK |
+ GDK_BUTTON3_MOTION_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_FOCUS_CHANGE_MASK;
pizza->bin_window = gdk_window_new(widget->window,
&attributes, attributes_mask);
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
}
}
-
+
return TRUE;
}
GtkPizza *pizza;
xevent = (XEvent *)gdk_xevent;
-
+
pizza = GTK_PIZZA (data);
-
+
if (!pizza->use_filter)
return GDK_FILTER_CONTINUE;
switch (xevent->type)
{
- case Expose:
- if (xevent->xexpose.serial == pizza->configure_serial)
- {
- xevent->xexpose.x += pizza->scroll_x;
- xevent->xexpose.y += pizza->scroll_y;
- }
- break;
+ case Expose:
+ if (xevent->xexpose.serial == pizza->configure_serial)
+ {
+ xevent->xexpose.x += pizza->scroll_x;
+ xevent->xexpose.y += pizza->scroll_y;
+ }
+ break;
- case ConfigureNotify:
- {
- pizza->configure_serial = xevent->xconfigure.serial;
- pizza->scroll_x = xevent->xconfigure.x;
- pizza->scroll_y = xevent->xconfigure.y;
- }
- break;
+ case ConfigureNotify:
+ {
+ pizza->configure_serial = xevent->xconfigure.serial;
+ pizza->scroll_x = xevent->xconfigure.x;
+ pizza->scroll_y = xevent->xconfigure.y;
+ }
+ break;
}
return GDK_FILTER_CONTINUE;
xevent = (XEvent *)gdk_xevent;
pizza = GTK_PIZZA (data);
-
+
if (!pizza->use_filter)
return GDK_FILTER_CONTINUE;
pizza->visibility = GDK_VISIBILITY_UNOBSCURED;
break;
}
-
+
return GDK_FILTER_REMOVE;
}
GdkEvent * WXUNUSED(event),
wxFrame *win )
{
- win->m_isIconized = FALSE;
+ win->SetIconizeState(FALSE);
}
//-----------------------------------------------------------------------------
GdkEvent * WXUNUSED(event),
wxFrame *win )
{
- win->m_isIconized = TRUE;
+ win->SetIconizeState(TRUE);
}
//-----------------------------------------------------------------------------
GtkPizza *pizza = GTK_PIZZA(widget);
gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
- GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1);
-
+ GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1);
+
return TRUE;
}
{
GtkPizza *pizza = GTK_PIZZA(widget);
- gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
- GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1);
+ gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1);
}
// ----------------------------------------------------------------------------
m_toolBarDetached = FALSE;
m_insertInClientArea = TRUE;
m_isFrame = TRUE;
- m_isIconized = FALSE;
+ m_isIconized = TRUE;
m_fsIsShowing = FALSE;
m_themeEnabled = TRUE;
}
m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame;
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
-
+
if (style & wxFRAME_TOOL_WINDOW)
win_type = GTK_WINDOW_POPUP;
#endif
/* we donm't allow the frame to get the focus as otherwise
- the frame will grabit at arbitrary fcous changes. */
+ the frame will grab it at arbitrary focus changes. */
GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
if (m_parent) m_parent->AddChild( this );
if (show == m_fsIsShowing) return FALSE; // return what?
m_fsIsShowing = show;
-
+
if (show)
{
m_fsSaveStyle = m_windowStyle;
m_fsSaveFlag = style;
GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y );
GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height );
-
+
gtk_widget_hide( m_widget );
gtk_widget_unrealize( m_widget );
-
+
m_windowStyle = wxSIMPLE_BORDER;
-
+
int x;
int y;
wxDisplaySize( &x, &y );
SetSize( 0, 0, x, y );
-
+
gtk_widget_realize( m_widget );
gtk_widget_show( m_widget );
}
{
gtk_widget_hide( m_widget );
gtk_widget_unrealize( m_widget );
-
+
m_windowStyle = m_fsSaveStyle;
-
+
SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height );
-
+
gtk_widget_realize( m_widget );
gtk_widget_show( m_widget );
}
-
+
return TRUE;
}
{
return m_isIconized;
}
+
+void wxFrame::SetIconizeState(bool iconize)
+{
+ if ( iconize != m_isIconized )
+ {
+ m_isIconized = iconize;
+ (void)SendIconizeEvent(iconize);
+ }
+ else
+ {
+ // this is not supposed to happen if we're called only from
+ // gtk_frame_(un)map_callback!
+ wxFAIL_MSG( _T("unexpected call to SendIconizeEvent ignored") );
+ }
+}
+
pizza->height = 20;
pizza->bin_window = NULL;
-
+
pizza->xoffset = 0;
pizza->yoffset = 0;
pizza->clear_on_draw = clear;
}
-void
+void
gtk_pizza_set_filter (GtkPizza *pizza,
gboolean use)
{
g_return_if_fail (GTK_IS_PIZZA (pizza));
pizza->use_filter = use;
-}
-
-void
+}
+
+void
gtk_pizza_set_external (GtkPizza *pizza,
gboolean expose)
{
}
}
-gint
+gint
gtk_pizza_child_resized (GtkPizza *pizza,
GtkWidget *widget)
{
(child->height == widget->allocation.height));
}
}
-
+
return FALSE;
}
-
+
static void
gtk_pizza_map (GtkWidget *widget)
{
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
- attributes.event_mask =
- GDK_VISIBILITY_NOTIFY_MASK;
+ attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new(gtk_widget_get_parent_window (widget),
attributes.y = 0;
attributes.event_mask = gtk_widget_get_events (widget);
- attributes.event_mask |=
- GDK_EXPOSURE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_MOTION_MASK |
- GDK_BUTTON1_MOTION_MASK |
- GDK_BUTTON2_MOTION_MASK |
- GDK_BUTTON3_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_FOCUS_CHANGE_MASK;
+ attributes.event_mask |= GDK_EXPOSURE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_MOTION_MASK |
+ GDK_BUTTON1_MOTION_MASK |
+ GDK_BUTTON2_MOTION_MASK |
+ GDK_BUTTON3_MOTION_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_FOCUS_CHANGE_MASK;
pizza->bin_window = gdk_window_new(widget->window,
&attributes, attributes_mask);
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
}
}
-
+
return TRUE;
}
GtkPizza *pizza;
xevent = (XEvent *)gdk_xevent;
-
+
pizza = GTK_PIZZA (data);
-
+
if (!pizza->use_filter)
return GDK_FILTER_CONTINUE;
switch (xevent->type)
{
- case Expose:
- if (xevent->xexpose.serial == pizza->configure_serial)
- {
- xevent->xexpose.x += pizza->scroll_x;
- xevent->xexpose.y += pizza->scroll_y;
- }
- break;
+ case Expose:
+ if (xevent->xexpose.serial == pizza->configure_serial)
+ {
+ xevent->xexpose.x += pizza->scroll_x;
+ xevent->xexpose.y += pizza->scroll_y;
+ }
+ break;
- case ConfigureNotify:
- {
- pizza->configure_serial = xevent->xconfigure.serial;
- pizza->scroll_x = xevent->xconfigure.x;
- pizza->scroll_y = xevent->xconfigure.y;
- }
- break;
+ case ConfigureNotify:
+ {
+ pizza->configure_serial = xevent->xconfigure.serial;
+ pizza->scroll_x = xevent->xconfigure.x;
+ pizza->scroll_y = xevent->xconfigure.y;
+ }
+ break;
}
return GDK_FILTER_CONTINUE;
xevent = (XEvent *)gdk_xevent;
pizza = GTK_PIZZA (data);
-
+
if (!pizza->use_filter)
return GDK_FILTER_CONTINUE;
pizza->visibility = GDK_VISIBILITY_UNOBSCURED;
break;
}
-
+
return GDK_FILTER_REMOVE;
}
void wxFrame::DoGetSize(int *width, int *height) const
{
- RECT rect;
- GetWindowRect(GetHwnd(), &rect);
- *width = rect.right - rect.left;
- *height = rect.bottom - rect.top;
+ RECT rect;
+ ::GetWindowRect(GetHwnd(), &rect);
+
+ *width = rect.right - rect.left;
+ *height = rect.bottom - rect.top;
}
void wxFrame::DoGetPosition(int *x, int *y) const
{
- RECT rect;
- GetWindowRect(GetHwnd(), &rect);
- POINT point;
- point.x = rect.left;
- point.y = rect.top;
+ RECT rect;
+ ::GetWindowRect(GetHwnd(), &rect);
- *x = point.x;
- *y = point.y;
+ *x = rect.left;
+ *y = rect.top;
}
// ----------------------------------------------------------------------------
// restore all child frames too
IconizeChildFrames(FALSE);
+ (void)SendIconizeEvent(FALSE);
+
// fall through
case SIZEFULLSCREEN:
// iconize all child frames too
IconizeChildFrames(TRUE);
+ (void)SendIconizeEvent();
+
m_iconized = TRUE;
break;
}