From e96360efd9015260be782e778c8076bb13cb6f5a Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 7 May 2001 09:57:45 +0000 Subject: [PATCH] Misc small mods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/gizmos/GizmosVC.dsp | 8 ++++++++ contrib/src/gizmos/makefile.b32 | 2 +- contrib/src/gizmos/makefile.bcc | 3 +-- contrib/src/gizmos/makefile.g95 | 2 +- contrib/src/gizmos/makefile.unx | 1 + contrib/src/gizmos/makefile.vc | 7 ++++++- contrib/src/gizmos/makefile.wat | 2 +- contrib/src/gizmos/splittree.cpp | 17 +++++++++++------ distrib/msw/xml.rsp | 6 ++++++ src/html/helpdata.cpp | 17 +++++++++++++++++ src/msw/taskbar.cpp | 6 +++--- 11 files changed, 56 insertions(+), 15 deletions(-) diff --git a/contrib/src/gizmos/GizmosVC.dsp b/contrib/src/gizmos/GizmosVC.dsp index 50c5301c97..cacdb63d7b 100644 --- a/contrib/src/gizmos/GizmosVC.dsp +++ b/contrib/src/gizmos/GizmosVC.dsp @@ -91,6 +91,10 @@ SOURCE=..\..\include\wx\gizmos\multicell.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\gizmos\editlbox.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\gizmos\splittree.h # End Source File # End Group @@ -100,6 +104,10 @@ SOURCE=.\multicell.cpp # End Source File # Begin Source File +SOURCE=.\editlbox.cpp +# End Source File +# Begin Source File + SOURCE=.\splittree.cpp # End Source File # End Target diff --git a/contrib/src/gizmos/makefile.b32 b/contrib/src/gizmos/makefile.b32 index 5d67598fa7..b50cd162da 100644 --- a/contrib/src/gizmos/makefile.b32 +++ b/contrib/src/gizmos/makefile.b32 @@ -11,7 +11,7 @@ WXDIR = $(WXWIN) LIBTARGET=$(WXDIR)\lib\gizmos.lib -OBJECTS = multicell.obj splittree.obj +OBJECTS = multicell.obj splittree.obj editlbox.obj !include $(WXDIR)\src\makelib.b32 diff --git a/contrib/src/gizmos/makefile.bcc b/contrib/src/gizmos/makefile.bcc index 21ebb33c2d..052c8b09c0 100644 --- a/contrib/src/gizmos/makefile.bcc +++ b/contrib/src/gizmos/makefile.bcc @@ -14,8 +14,7 @@ WXDIR = $(WXWIN) LIBTARGET=$(WXDIR)\lib\gizmos.lib -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ - composit.obj drawn.obj bmpshape.obj mfutils.obj +OBJECTS = multicell.obj splittree.obj editlbox.obj !include $(WXDIR)\src\makelib.bcc diff --git a/contrib/src/gizmos/makefile.g95 b/contrib/src/gizmos/makefile.g95 index b8300a5b3c..e289454288 100644 --- a/contrib/src/gizmos/makefile.g95 +++ b/contrib/src/gizmos/makefile.g95 @@ -10,7 +10,7 @@ WXDIR = ../../.. LIBTARGET=$(WXDIR)/lib/libgizmos.a -OBJECTS = multicell.o splittree.o +OBJECTS = multicell.o splittree.o editlbox.o include $(WXDIR)/src/makelib.g95 diff --git a/contrib/src/gizmos/makefile.unx b/contrib/src/gizmos/makefile.unx index fcf7414d1a..c1fae75d2a 100644 --- a/contrib/src/gizmos/makefile.unx +++ b/contrib/src/gizmos/makefile.unx @@ -15,6 +15,7 @@ GIZMOSLIB=$(WXDIR)/lib/libgizmos$(GUISUFFIX).a LIB_CPP_SRC=\ \ multicell.o\ + editlbox.o\ splittree.o all: $(GIZMOSLIB) diff --git a/contrib/src/gizmos/makefile.vc b/contrib/src/gizmos/makefile.vc index bcfd23804e..7aef83ead2 100644 --- a/contrib/src/gizmos/makefile.vc +++ b/contrib/src/gizmos/makefile.vc @@ -23,7 +23,7 @@ LOCALDOCDIR=$(WXDIR)\contrib\docs\latex\gizmos !include $(WXDIR)\src\makevc.env -OBJECTS = $(D)\multicell.obj $(D)\splittree.obj +OBJECTS = $(D)\multicell.obj $(D)\splittree.obj $(D)\editlbox.obj LIBTARGET=$(WXDIR)\lib\gizmos$(LIBEXT).lib @@ -60,6 +60,11 @@ $(D)\splittree.obj: splittree.$(SRCSUFF) $(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF) << +$(D)\editlbox.obj: editlbox.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF) +<< + clean: -erase $(D)\*.obj -erase *.sbr diff --git a/contrib/src/gizmos/makefile.wat b/contrib/src/gizmos/makefile.wat index 3d44de34ab..0d01935c1f 100644 --- a/contrib/src/gizmos/makefile.wat +++ b/contrib/src/gizmos/makefile.wat @@ -10,7 +10,7 @@ THISDIR = $(WXDIR)\contrib\src\gizmos NAME = gizmos LNK = $(name).lnk -OBJECTS = multicell.obj splittree.obj +OBJECTS = multicell.obj splittree.obj editlbox.obj all: $(GIZMOSLIB) diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index d1911ee8e3..71b8145da1 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -38,6 +38,7 @@ #include "wx/generic/treectlg.h" #include "wx/gizmos/splittree.h" +#include /* * wxRemotelyScrolledTreeCtrl @@ -170,7 +171,7 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc) scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2); dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 ); - dc.SetUserScale( win->GetScaleX(), win->GetScaleY() ); + // dc.SetUserScale( win->GetScaleX(), win->GetScaleY() ); } } @@ -244,14 +245,18 @@ void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars() wxRect itemRect; if (GetBoundingRect(GetRootItem(), itemRect)) { - int itemHeight = itemRect.GetHeight(); + // Actually, the real height seems to be 1 less than reported + // (e.g. 16 instead of 16) + int itemHeight = itemRect.GetHeight() - 1; int w, h; GetClientSize(&w, &h); wxRect rect(0, 0, 0, 0); CalcTreeSize(rect); - int treeViewHeight = rect.GetHeight()/itemHeight; + + double f = ((double) (rect.GetHeight()) / (double) itemHeight) ; + int treeViewHeight = (int) ceil(f); int scrollPixelsPerLine = itemHeight; int scrollPos = - (itemRect.y / itemHeight); @@ -299,9 +304,6 @@ void wxRemotelyScrolledTreeCtrl::CalcTreeSize(wxRect& rect) void wxRemotelyScrolledTreeCtrl::CalcTreeSize(const wxTreeItemId& id, wxRect& rect) { - // TODO: implement GetFirst/NextVisibleItem - // for wxGenericTreeCtrl, plus GetBoundingRect. - // More efficient implementation would be to find the last item (but how?) // Q: is the bounding rect relative to the top of the virtual tree workspace // or the top of the window? How would we convert? @@ -571,7 +573,10 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event) // don't cause an infinite loop static bool inOnScroll = FALSE; if (inOnScroll) + { + event.Skip(); return; + } inOnScroll = TRUE; int orient = event.GetOrientation(); diff --git a/distrib/msw/xml.rsp b/distrib/msw/xml.rsp index b7dd8be953..1ec456e659 100644 --- a/distrib/msw/xml.rsp +++ b/distrib/msw/xml.rsp @@ -39,6 +39,12 @@ contrib/src/xml/*.ico contrib/src/xml/*.bmp contrib/src/xml/README +contrib/src/xml/expat/copying.txt +contrib/src/xml/expat/xmlparse/*.c +contrib/src/xml/expat/xmlparse/*.h +contrib/src/xml/expat/xmltok/*.c +contrib/src/xml/expat/xmltok/*.h + contrib/include/wx/xml/*.h contrib/samples/xml/*.cpp diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 8250d38e49..7469fc6f2e 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -138,10 +138,27 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag) #endif if (tag.GetParam(wxT("TYPE")) == wxT("text/sitemap")) { +/* + // We're reading in items at level zero, which must mean we want to specify + // our own 'books', so chuck out the first (empty) one that AddBook already + // created + if (m_firstTime && (m_Level == 0) && (m_ItemsCnt > 0)) + { + delete[] m_Items[0].m_Name; + delete[] m_Items[0].m_Page; + m_ItemsCnt --; + } + else + { + if (m_ItemsCnt % wxHTML_REALLOC_STEP == 0) + m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + wxHTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem)); + } +*/ if (m_ItemsCnt % wxHTML_REALLOC_STEP == 0) m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + wxHTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem)); + m_Items[m_ItemsCnt].m_Level = m_Level; m_Items[m_ItemsCnt].m_ID = m_ID; m_Items[m_ItemsCnt].m_Page = new wxChar[m_Page.Length() + 1]; diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 13235cea9d..0cab9d2d3a 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -113,10 +113,10 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) notifyData.hWnd = (HWND) m_hWnd; notifyData.uCallbackMessage = sm_taskbarMsg; notifyData.uFlags = NIF_MESSAGE ; - if (icon.Ok()) + if (icon.Ok()) { - notifyData.uFlags |= NIF_ICON; - notifyData.hIcon = (HICON) icon.GetHICON(); + notifyData.uFlags |= NIF_ICON; + notifyData.hIcon = (HICON) icon.GetHICON(); } if (((const wxChar*) tooltip != NULL) && (tooltip != wxT(""))) -- 2.45.2