]> git.saurik.com Git - wxWidgets.git/commitdiff
Misc small mods
authorJulian Smart <julian@anthemion.co.uk>
Mon, 7 May 2001 09:57:45 +0000 (09:57 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 7 May 2001 09:57:45 +0000 (09:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/gizmos/GizmosVC.dsp
contrib/src/gizmos/makefile.b32
contrib/src/gizmos/makefile.bcc
contrib/src/gizmos/makefile.g95
contrib/src/gizmos/makefile.unx
contrib/src/gizmos/makefile.vc
contrib/src/gizmos/makefile.wat
contrib/src/gizmos/splittree.cpp
distrib/msw/xml.rsp
src/html/helpdata.cpp
src/msw/taskbar.cpp

index 50c5301c97f4e11b9c551074d7c690ca25af2cf2..cacdb63d7ba7d2adb2a8354c5b45c2a66b3044d4 100644 (file)
@@ -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
index 5d67598fa77f2626414136d5b57e104109e0b6bf..b50cd162dabee2a428dc0d4570b55f31992270ba 100644 (file)
@@ -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
 
index 21ebb33c2dc15410be8ce8d88a62dd7324888140..052c8b09c0a67e23e13223abe79eb03a6cd9d3b4 100644 (file)
@@ -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
 
index b8300a5b3cc8d1f76e37ac2b65a1226e1540a2f9..e28945428840c7731ba4338a345efd24f65a8073 100644 (file)
@@ -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
 
index fcf7414d1a4f0ba20c3abcc676599b941d87d6df..c1fae75d2ab62de6d0f57413ee741de436b39d4d 100644 (file)
@@ -15,6 +15,7 @@ GIZMOSLIB=$(WXDIR)/lib/libgizmos$(GUISUFFIX).a
 LIB_CPP_SRC=\
 \
   multicell.o\
+  editlbox.o\
   splittree.o
 
 all:    $(GIZMOSLIB)
index bcfd23804e7b714345b26c57300a1af30e8354c5..7aef83ead29800c723e6b0c3a4555e22e6a1f155 100644 (file)
@@ -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
index 3d44de34abf98232d7179c3562211b3c158e069d..0d01935c1faf2d35f8ff1ba97de1dfada35891ac 100644 (file)
@@ -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)
 
index d1911ee8e3076f9a8c05e23385fd187bea6f4f85..71b8145da1dc0518e74f64a0b0ff9d6f17ec5341 100644 (file)
@@ -38,6 +38,7 @@
 #include "wx/generic/treectlg.h"
 
 #include "wx/gizmos/splittree.h"
+#include <math.h>
 
 /*
  * 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();
index b7dd8be9539554c5ce982cdc771b34545a6f7671..1ec456e659607191954511b3bad3ec206dbe8ccd 100644 (file)
@@ -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
index 8250d38e4931df37c61f5480480047b19264bde1..7469fc6f2e231f23f4d4472edefe87cc53f1be85 100644 (file)
@@ -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];
index 13235cea9d9c39a58e433db87e6488ba04a1add3..0cab9d2d3aecfdb2f333eca1ce15d7eda95b10ac 100644 (file)
@@ -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("")))