Misc small mods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2001-05-07 09:57:45 +00:00
parent 1c84ee88f6
commit e96360efd9
11 changed files with 56 additions and 15 deletions

View 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

View 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

View 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

View 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

View File

@ -15,6 +15,7 @@ GIZMOSLIB=$(WXDIR)/lib/libgizmos$(GUISUFFIX).a
LIB_CPP_SRC=\
\
multicell.o\
editlbox.o\
splittree.o
all: $(GIZMOSLIB)

View 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

View 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)

View 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();

View 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

View 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];

View 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("")))