\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).}
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).}
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only).}
+\twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{Windows only. Causes the frame to be above the parent window in the
+z-order and not shown in the taskbar. Without this style, frames are created as top-level windows that may be obscured by
+the parent window, and frame titles are shown in the taskbar. On Motif and GTK, the behaviour is always as if this
+style is not specified.}
+\twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Windows only. Causes a frame with a small titlebar to be created;
+the frame title does not appear in the taskbar.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}. Currently the GTK port of wxWindows
\helpref{wxRegion}{wxregion}, \helpref{wxRegionIterator}{wxregioniterator}, \helpref{wxWindow::OnPaint}{wxwindowonpaint}
+\membersection{wxWindow::GetValidator}\label{wxwindowgetvalidator}
+
+\constfunc{wxValidator*}{GetValidator}{\void}
+
+Returns a pointer to the current validator for the window, or NULL if there is none.
+
\membersection{wxWindow::GetWindowStyleFlag}
\constfunc{long}{GetWindowStyleFlag}{\void}
\helpref{wxWindow::GetTitle}{wxwindowgettitle}
-\membersection{wxWindow::Show}
+\membersection{wxWindow::SetValidator}\label{wxwindowsetvalidator}
+
+\func{virtual void}{SetValidator}{\param{const wxValidator\&}{ validator}}
+
+Deletes the current validator (if any) and sets the window validator, having called wxValidator::Clone to
+create a new validator of this type.
+
+\membersection{wxWindow::Show}\label{wxwindowshow}
\func{virtual bool}{Show}{\param{const bool}{ show}}
#define wxRESIZE_BORDER 0x0040
#define wxDIALOG_MODAL 0x0020
#define wxDIALOG_MODELESS 0x0000
+/* Add for normal Windows frame behaviour */
+#define wxFRAME_FLOAT_ON_PARENT 0x0020
#define wxDEFAULT_FRAME_STYLE (wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN)
#define wxGA_PROGRESSBAR 0x0004
#define wxGA_HORIZONTAL wxHORIZONTAL
#define wxGA_VERTICAL wxVERTICAL
+/* Windows only */
+#define wxGA_SMOOTH 0x0008
/*
* wxSlider flags
wxASSERT( IS_VALID_PAGE(nPage) );
+#if defined (__WIN16__)
+ m_tabView->SetTabSelection(nPage);
+#else
wxNotebookPage* pPage = GetPage(nPage);
m_tabView->SetTabSelection((int) (long) pPage);
-
+#endif
// TODO
return 0;
}
bool wxNotebook::SetPageText(int nPage, const wxString& strText)
{
wxASSERT( IS_VALID_PAGE(nPage) );
-
+#if defined (__WIN16__)
+ m_tabView->SetTabText(nPage, strText);
+ Refresh();
+ return TRUE;
+#else
wxNotebookPage* page = GetPage(nPage);
if (page)
{
Refresh();
return TRUE;
}
-
+#endif
return FALSE;
}
{
wxASSERT( IS_VALID_PAGE(nPage) );
+#if defined (__WIN16__)
+ return m_tabView->GetTabText(nPage);
+#else
wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage);
if (page)
return m_tabView->GetTabText((int) (long) page);
else
return wxEmptyString;
+#endif
}
int wxNotebook::GetPageImage(int nPage) const
}
wxNotebookPage* pPage = GetPage(nPage);
+#if defined (__WIN16__)
+ m_tabView->RemoveTab(nPage);
+#else
m_tabView->RemoveTab((int) (long) pPage);
+#endif
delete m_aPages[nPage];
m_aPages.Remove(nPage);
else if (m_nSelection > -1)
{
m_nSelection = -1;
+#if defined (__WIN16__)
+ m_tabView->SetTabSelection(0, FALSE);
+#else
m_tabView->SetTabSelection((int) (long) GetPage(0), FALSE);
+#endif
if (m_nSelection != 0)
ChangePage(-1, 0);
}
// m_aPages[nPage]->Lower();
wxNotebookPage* pPage = GetPage(nPage);
+#if defined (__WIN16__)
+ m_tabView->RemoveTab(nPage);
+#else
m_tabView->RemoveTab((int) (long) pPage);
+#endif
m_aPages.Remove(nPage);
wxASSERT( pPage != NULL );
wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
+// For 16 bit integers (tabs limited to 32768)
+#if defined (__WIN16__)
+ m_tabView->AddTab(nPage, strText);
+#else
m_tabView->AddTab((int) (long) pPage, strText);
+#endif
if (!bSelect)
pPage->Show(FALSE);
if (bSelect)
{
// This will cause ChangePage to be called, via OnSelPage
+#if defined (__WIN16__)
+ m_tabView->SetTabSelection(nPage, TRUE);
+#else
m_tabView->SetTabSelection((int) (long) pPage, TRUE);
+#endif
}
// some page must be selected: either this one or the first one if there is
return rect;
}
-void wxNotebook::SetTabSize(const wxSize& sz)
-{
- // TODO
-}
-
/*
* wxNotebookTabView
*/
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
#endif
+#if defined (__WIN16__)
+ int activatePos = activateId;
+ int deactivatePos = deactivateId;
+#else
// Translate from wxTabView's ids (which aren't position-dependent)
// to wxNotebook's (which are).
wxNotebookPage* pActive = (wxNotebookPage*) activateId;
int activatePos = m_notebook->FindPagePosition(pActive);
int deactivatePos = m_notebook->FindPagePosition(pDeactive);
+#endif
event.SetEventObject(m_notebook);
event.SetSelection(activatePos);
event.SetOldSelection(deactivatePos);
// we pass NULL as parent to MSWCreate because frames with parents behave
// very strangely under Win95 shell
- MSWCreate(m_windowId, NULL, wxFrameClassName, this, title,
+ // Alteration by JACS: keep normal Windows behaviour (float on top of parent)
+ // with this style.
+ if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0)
+ parent = NULL;
+
+ MSWCreate(m_windowId, parent, wxFrameClassName, this, title,
x, y, width, height, style);
wxModelessWindows.Append(this);
int height = size.y;
long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
+ if (m_windowStyle & wxGA_VERTICAL)
+ msFlags |= PBS_VERTICAL;
+
+ if (m_windowStyle & wxGA_SMOOTH)
+ msFlags |= PBS_SMOOTH;
HWND wx_button =
CreateWindowEx(MakeExtendedStyle(m_windowStyle), PROGRESS_CLASS, NULL, msFlags,
{
oleVariant.vt = VT_BOOL;
// 'bool' required for VC++ 4 apparently
-#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000))
+#if defined(__WATCOMC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1000))
oleVariant.bool = variant.GetBool();
#else
oleVariant.boolVal = variant.GetBool();
case VT_BOOL:
{
-#ifdef __WATCOMC__
+#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) //GC
variant = (bool) (oleVariant.bool != 0);
#else
variant = (bool) (oleVariant.boolVal != 0);
wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1);
}
+#elif defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ <= 1000)
+
+// For VC++ 4
+void wxLogQueryInterface(const char *szInterface, REFIID riid)
+{
+ wxLogTrace("%s::QueryInterface", szInterface);
+}
+
+void wxLogAddRef(const char *szInterface, ULONG cRef)
+{
+ wxLogTrace("After %s::AddRef: m_cRef = %d", szInterface, cRef + 1);
+}
+
+void wxLogRelease(const char *szInterface, ULONG cRef)
+{
+ wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1);
+}
+
#endif //WXDEBUG
#endif
#
-# File: makefile.nt
+# File: makefile.vc
# Author: Julian Smart
# Created: 1993
# Updated:
all:
cd $(WXDIR)\utils\dialoged\src
- nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
- cd $(WXDIR)\utils\wxprop\src
- nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+ nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\hytext\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\mfutils\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\tex2rtf\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxbuild\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxgraph\src
-# nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxtree\src
-# nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxhelp\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wximage\win
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxweb\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxhelp2\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\clockwrk\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxanim\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\colours
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\ogl\src
-# nmake -f makefile.nt DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
# cd $(WXDIR)\utils\wxchart\src
-# nmake -f makefile.nt test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
+# nmake -f makefile.vc test DEBUG_FLAGS=$(DEBUG_FLAGS) LINK_DEBUG_FLAGS=$(LINK_DEBUG_FLAGS)
clean:
- cd $(WXDIR)\utils\wxprop\src
- nmake -f makefile.nt clean
cd $(WXDIR)\utils\dialoged\src
- nmake -f makefile.nt clean
+ nmake -f makefile.vc clean
cd $(WXDIR)\utils\nplugin
- nmake -f makefile.nt clean
+ nmake -f makefile.vc clean
# cd $(WXDIR)\utils\hytext\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\mfutils\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\tex2rtf\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxbuild\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxgraph\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxtree\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxhelp\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxhelp2\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\clockwrk\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxanim\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\colours
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\ogl\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxchart\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wxweb\src
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean
# cd $(WXDIR)\utils\wximage\win
-# nmake -f makefile.nt clean
+# nmake -f makefile.vc clean