--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: wx/mgl/popupwin.h
+// Purpose: wxPopupWindow class for wxMGL
+// Author: Vadim Zeitlin
+// Created: 06.01.01
+// RCS-ID: $Id$
+// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_POPUPWIN_H_
+#define _WX_POPUPWIN_H_
+
+// ----------------------------------------------------------------------------
+// wxPopupWindow
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxPopupWindow : public wxPopupWindowBase
+{
+public:
+ wxPopupWindow() { }
+
+ wxPopupWindow(wxWindow *parent) { (void)Create(parent); }
+
+ bool Create(wxWindow *parent, int flags = wxBORDER_NONE)
+ {
+ return wxPopupWindowBase::Create(parent) &&
+ wxWindow::Create(parent, -1,
+ wxDefaultPosition, wxDefaultSize,
+ flags & wxBORDER_MASK);
+ }
+};
+
+#endif // _WX_POPUPWIN_H_
+
static void wxWindowPainter(window_t *wnd, MGLDC *dc)
{
wxWindowMGL *w = (wxWindow*) wnd->userData;
- if (w && !(w->GetStyle() & wxTRANSPARENT_WINDOW))
+ if ( w && !(w->GetWindowStyle() & wxTRANSPARENT_WINDOW) )
{
MGLDevCtx ctx(dc);
w->HandlePaint(&ctx);
break;
}
+ #undef KEY
+
return key;
}
static ibool wxWindowKeybHandler(window_t *wnd, event_t *e)
{
- wxEventType type = wxEVT_NULL;
wxWindowMGL *win = (wxWindowMGL*)MGL_wmGetWindowUserData(wnd);
if ( !win->IsEnabled() ) return FALSE;
long style,
const wxString& name)
{
- // FIXME_MGL -- temporary!
- //wxCHECK_MSG( parent, FALSE, wxT("can't create wxWindow without parent") );
-
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
return FALSE;
- if ( parent ) // FIXME_MGL temporary
+ if ( parent )
parent->AddChild(this);
- else
- m_isShown=FALSE;// FIXME_MGL -- temporary, simulates wxTLW/wxFrame
-
- if ( style & wxPOPUP_WINDOW )
- {
- // it is created hidden as other top level windows
- m_isShown = FALSE;
- }
int x, y, w, h;
x = pos.x, y = pos.y;
h = HeightDefault(size.y);
long mgl_style = 0;
+
if ( !(style & wxNO_FULL_REPAINT_ON_RESIZE) )
+ {
mgl_style |= MGL_WM_FULL_REPAINT_ON_RESIZE;
+ }
if ( style & wxSTAY_ON_TOP )
+ {
mgl_style |= MGL_WM_ALWAYS_ON_TOP;
+ }
+ if ( style & wxPOPUP_WINDOW )
+ {
+ mgl_style |= MGL_WM_ALWAYS_ON_TOP;
+ // it is created hidden as other top level windows
+ m_isShown = FALSE;
+ }
m_wnd = MGL_wmCreateWindow(g_winMng,
parent ? parent->GetHandle() : NULL,
if ( IsTopLevel() )
{
+ // FIXME_MGL - this is wrong, see wxGTK!
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
if ( IsTopLevel() )
{
+ // FIXME_MGL - this is wrong, see wxGTK!
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);