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:
parent
1c84ee88f6
commit
e96360efd9
@ -91,6 +91,10 @@ SOURCE=..\..\include\wx\gizmos\multicell.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\include\wx\gizmos\editlbox.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\include\wx\gizmos\splittree.h
|
SOURCE=..\..\include\wx\gizmos\splittree.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
@ -100,6 +104,10 @@ SOURCE=.\multicell.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\editlbox.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\splittree.cpp
|
SOURCE=.\splittree.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
|
@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makelib.b32
|
!include $(WXDIR)\src\makelib.b32
|
||||||
|
|
||||||
|
@ -14,8 +14,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
||||||
|
|
||||||
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
|
OBJECTS = multicell.obj splittree.obj editlbox.obj
|
||||||
composit.obj drawn.obj bmpshape.obj mfutils.obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makelib.bcc
|
!include $(WXDIR)\src\makelib.bcc
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
WXDIR = ../../..
|
WXDIR = ../../..
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)/lib/libgizmos.a
|
LIBTARGET=$(WXDIR)/lib/libgizmos.a
|
||||||
OBJECTS = multicell.o splittree.o
|
OBJECTS = multicell.o splittree.o editlbox.o
|
||||||
|
|
||||||
include $(WXDIR)/src/makelib.g95
|
include $(WXDIR)/src/makelib.g95
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ GIZMOSLIB=$(WXDIR)/lib/libgizmos$(GUISUFFIX).a
|
|||||||
LIB_CPP_SRC=\
|
LIB_CPP_SRC=\
|
||||||
\
|
\
|
||||||
multicell.o\
|
multicell.o\
|
||||||
|
editlbox.o\
|
||||||
splittree.o
|
splittree.o
|
||||||
|
|
||||||
all: $(GIZMOSLIB)
|
all: $(GIZMOSLIB)
|
||||||
|
@ -23,7 +23,7 @@ LOCALDOCDIR=$(WXDIR)\contrib\docs\latex\gizmos
|
|||||||
|
|
||||||
!include $(WXDIR)\src\makevc.env
|
!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
|
LIBTARGET=$(WXDIR)\lib\gizmos$(LIBEXT).lib
|
||||||
|
|
||||||
@ -60,6 +60,11 @@ $(D)\splittree.obj: splittree.$(SRCSUFF)
|
|||||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||||
<<
|
<<
|
||||||
|
|
||||||
|
$(D)\editlbox.obj: editlbox.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-erase $(D)\*.obj
|
-erase $(D)\*.obj
|
||||||
-erase *.sbr
|
-erase *.sbr
|
||||||
|
@ -10,7 +10,7 @@ THISDIR = $(WXDIR)\contrib\src\gizmos
|
|||||||
NAME = gizmos
|
NAME = gizmos
|
||||||
LNK = $(name).lnk
|
LNK = $(name).lnk
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj
|
||||||
|
|
||||||
all: $(GIZMOSLIB)
|
all: $(GIZMOSLIB)
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "wx/generic/treectlg.h"
|
#include "wx/generic/treectlg.h"
|
||||||
|
|
||||||
#include "wx/gizmos/splittree.h"
|
#include "wx/gizmos/splittree.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxRemotelyScrolledTreeCtrl
|
* wxRemotelyScrolledTreeCtrl
|
||||||
@ -170,7 +171,7 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
|||||||
scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2);
|
scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2);
|
||||||
|
|
||||||
dc.SetDeviceOrigin( -startX * xppu1, -startY * 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;
|
wxRect itemRect;
|
||||||
if (GetBoundingRect(GetRootItem(), 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;
|
int w, h;
|
||||||
GetClientSize(&w, &h);
|
GetClientSize(&w, &h);
|
||||||
|
|
||||||
wxRect rect(0, 0, 0, 0);
|
wxRect rect(0, 0, 0, 0);
|
||||||
CalcTreeSize(rect);
|
CalcTreeSize(rect);
|
||||||
int treeViewHeight = rect.GetHeight()/itemHeight;
|
|
||||||
|
double f = ((double) (rect.GetHeight()) / (double) itemHeight) ;
|
||||||
|
int treeViewHeight = (int) ceil(f);
|
||||||
|
|
||||||
int scrollPixelsPerLine = itemHeight;
|
int scrollPixelsPerLine = itemHeight;
|
||||||
int scrollPos = - (itemRect.y / itemHeight);
|
int scrollPos = - (itemRect.y / itemHeight);
|
||||||
@ -299,9 +304,6 @@ void wxRemotelyScrolledTreeCtrl::CalcTreeSize(wxRect& rect)
|
|||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::CalcTreeSize(const wxTreeItemId& id, 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?)
|
// 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
|
// Q: is the bounding rect relative to the top of the virtual tree workspace
|
||||||
// or the top of the window? How would we convert?
|
// 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
|
// don't cause an infinite loop
|
||||||
static bool inOnScroll = FALSE;
|
static bool inOnScroll = FALSE;
|
||||||
if (inOnScroll)
|
if (inOnScroll)
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
inOnScroll = TRUE;
|
inOnScroll = TRUE;
|
||||||
|
|
||||||
int orient = event.GetOrientation();
|
int orient = event.GetOrientation();
|
||||||
|
@ -39,6 +39,12 @@ contrib/src/xml/*.ico
|
|||||||
contrib/src/xml/*.bmp
|
contrib/src/xml/*.bmp
|
||||||
contrib/src/xml/README
|
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/include/wx/xml/*.h
|
||||||
|
|
||||||
contrib/samples/xml/*.cpp
|
contrib/samples/xml/*.cpp
|
||||||
|
@ -138,10 +138,27 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
|
|||||||
#endif
|
#endif
|
||||||
if (tag.GetParam(wxT("TYPE")) == wxT("text/sitemap"))
|
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)
|
if (m_ItemsCnt % wxHTML_REALLOC_STEP == 0)
|
||||||
m_Items = (wxHtmlContentsItem*) realloc(m_Items,
|
m_Items = (wxHtmlContentsItem*) realloc(m_Items,
|
||||||
(m_ItemsCnt + wxHTML_REALLOC_STEP) *
|
(m_ItemsCnt + wxHTML_REALLOC_STEP) *
|
||||||
sizeof(wxHtmlContentsItem));
|
sizeof(wxHtmlContentsItem));
|
||||||
|
|
||||||
m_Items[m_ItemsCnt].m_Level = m_Level;
|
m_Items[m_ItemsCnt].m_Level = m_Level;
|
||||||
m_Items[m_ItemsCnt].m_ID = m_ID;
|
m_Items[m_ItemsCnt].m_ID = m_ID;
|
||||||
m_Items[m_ItemsCnt].m_Page = new wxChar[m_Page.Length() + 1];
|
m_Items[m_ItemsCnt].m_Page = new wxChar[m_Page.Length() + 1];
|
||||||
|
Loading…
Reference in New Issue
Block a user