Compare commits
106 Commits
v2.8.1
...
wxPy_2_8_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
043fd155ae | ||
|
|
0d3847e80c | ||
|
|
e86fbab1ba | ||
|
|
1ddcb14574 | ||
|
|
a0d5472b1b | ||
|
|
6caa0f5cd1 | ||
|
|
5712281c5d | ||
|
|
68585e1770 | ||
|
|
4aab34290a | ||
|
|
f24b783af3 | ||
|
|
6d727f6c10 | ||
|
|
5f28de16f3 | ||
|
|
0fdd3cc881 | ||
|
|
447325a44f | ||
|
|
3aba082d50 | ||
|
|
fc9f11cc6f | ||
|
|
869c929083 | ||
|
|
9030e77918 | ||
|
|
67879c5b41 | ||
|
|
a0232aa520 | ||
|
|
01ad5e43bf | ||
|
|
1d51064ce3 | ||
|
|
0149e27783 | ||
|
|
7fa8d0854b | ||
|
|
fd363e1abc | ||
|
|
df794ecc9f | ||
|
|
9aaca412e2 | ||
|
|
6646ca90e8 | ||
|
|
b901ac2c3b | ||
|
|
04af2f5ce3 | ||
|
|
49f29fbe2c | ||
|
|
65d7319f85 | ||
|
|
1fe8ec6d3d | ||
|
|
0f0298b10c | ||
|
|
646c7e13ea | ||
|
|
6594faa98e | ||
|
|
5a2d9e121f | ||
|
|
6a6c9417a8 | ||
|
|
627ddac99e | ||
|
|
165d3652ff | ||
|
|
186453cc7c | ||
|
|
9249d38d6e | ||
|
|
fb96cf856e | ||
|
|
75d0223f8c | ||
|
|
8030e0e954 | ||
|
|
27587c251c | ||
|
|
b08d67c27b | ||
|
|
5541976c17 | ||
|
|
7d69a5715e | ||
|
|
61071e6160 | ||
|
|
3e47020738 | ||
|
|
2207fd2168 | ||
|
|
df0468c73a | ||
|
|
652dbdc0ab | ||
|
|
81073d9209 | ||
|
|
c25db58432 | ||
|
|
4d1f840337 | ||
|
|
a1b289f1f9 | ||
|
|
09a0945522 | ||
|
|
3f83a9cda3 | ||
|
|
3b5d20079c | ||
|
|
b8508db8b4 | ||
|
|
0d3997fd6d | ||
|
|
cfbf301d7c | ||
|
|
d95527de9a | ||
|
|
fc2b0e31bb | ||
|
|
4f690a1d5e | ||
|
|
5d389b0445 | ||
|
|
6a6e282245 | ||
|
|
302129f896 | ||
|
|
19a885344a | ||
|
|
46831f391b | ||
|
|
cfce9d35ad | ||
|
|
f1c5e92f3f | ||
|
|
da88bc1a18 | ||
|
|
d576c660f7 | ||
|
|
156d7d8626 | ||
|
|
e49426a206 | ||
|
|
7749035c4e | ||
|
|
f241631e6d | ||
|
|
4b6930c813 | ||
|
|
8d206c073d | ||
|
|
5a253c3f0a | ||
|
|
a8b2285edf | ||
|
|
21de14b331 | ||
|
|
e7b21b01fe | ||
|
|
3d490242f0 | ||
|
|
d40e9e06bb | ||
|
|
b6d8301814 | ||
|
|
e816f5c736 | ||
|
|
be809e82f2 | ||
|
|
9c80e160ec | ||
|
|
02f0eca5fb | ||
|
|
c640dfa5e8 | ||
|
|
d716e45315 | ||
|
|
9d5bd96c58 | ||
|
|
3273f8342e | ||
|
|
1ff18f49b9 | ||
|
|
8ef74b15f7 | ||
|
|
3b849b9a88 | ||
|
|
b432b50d61 | ||
|
|
715ce94da9 | ||
|
|
3633deedb4 | ||
|
|
a3c8c017cf | ||
|
|
fb66c150a4 | ||
|
|
63dd461bc8 |
@@ -54,22 +54,22 @@
|
||||
</add-formats>
|
||||
|
||||
<del-formats files="../../samples/*.bkl">
|
||||
autoconf,msvc6prj,msevc4prj,cbuilderx,cbx_unix
|
||||
autoconf,msvc6prj,msevc4prj,msvs2005prj,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
<del-formats files="../../demos/*.bkl">
|
||||
msvc6prj,msevc4prj,cbuilderx,cbx_unix
|
||||
msvc6prj,msevc4prj,msvs2005prj,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
<del-formats files="../../samples/html/html_samples.bkl">
|
||||
msvc6prj,msevc4prj,cbuilderx,cbx_unix
|
||||
msvc6prj,msevc4prj,msvs2005prj,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
<del-formats files="../../samples/mobile/mobile_samples.bkl">
|
||||
msvc6prj,msevc4prj,cbuilderx,cbx_unix
|
||||
msvc6prj,msevc4prj,msvs2005prj,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
<del-formats files="../../samples/opengl/opengl_samples.bkl">
|
||||
msvc6prj,msevc4prj,cbuilderx,cbx_unix
|
||||
msvc6prj,msevc4prj,msvs2005prj,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
<del-formats files="../../utils/*.bkl">
|
||||
msvc6prj,msevc4prj,cbuilderx,cbx_unix
|
||||
msvc6prj,msevc4prj,msvs2005prj,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
|
||||
<!-- WinCE can't have console apps: -->
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<!-- HtmlCtrl sample is Cocoa only (autoconf format) -->
|
||||
<del-formats files="../../samples/html/htmlctrl/htmlctrl.bkl">
|
||||
borland,dmars_smake,dmars,mingw,msvc,msvc6prj,msevc4prj,watcom,cbuilderx,cbx_unix
|
||||
borland,dmars_smake,dmars,mingw,msvc,msvc6prj,msevc4prj,msvs2005prj,watcom,cbuilderx,cbx_unix
|
||||
</del-formats>
|
||||
|
||||
|
||||
@@ -114,6 +114,9 @@
|
||||
<add-flags files="wx.bkl" formats="msvc6prj">
|
||||
-o../msw/wx.dsw
|
||||
</add-flags>
|
||||
<add-flags files="wx.bkl" formats="msvs2005prj">
|
||||
-o../msw/wx.sln
|
||||
</add-flags>
|
||||
<add-flags files="wx.bkl" formats="msevc4prj">
|
||||
-o../wince/wx.vcw
|
||||
</add-flags>
|
||||
@@ -131,7 +134,7 @@
|
||||
-o../../contrib/src/$(INPUT_FILE_BASENAME_NOEXT)/$(INPUT_FILE_BASENAME_NOEXT).cbx
|
||||
</add-flags>
|
||||
<add-flags files="../../contrib/build/*/*.bkl"
|
||||
formats="mingw,borland,dmars_smake,dmars,watcom,msvc,msvc6prj,msevc4prj">
|
||||
formats="mingw,borland,dmars_smake,dmars,watcom,msvc,msvc6prj,msevc4prj,msvs2005prj">
|
||||
-DSRCDIR=../../src/$(INPUT_FILE_BASENAME_NOEXT)
|
||||
</add-flags>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
the library.
|
||||
-->
|
||||
|
||||
<if cond="FORMAT not in ['autoconf','msvc6prj','msevc4prj','cbuilderx'] and
|
||||
<if cond="FORMAT not in ['autoconf','msvc6prj','msevc4prj','msvs2005prj','cbuilderx'] and
|
||||
TOOLKIT in ['PM','MSW','MGL','MOTIF']">
|
||||
|
||||
<set var="BUILD_CFG_FILE" make_var="1">
|
||||
|
||||
@@ -347,7 +347,9 @@
|
||||
|
||||
<!-- deal with the need to copy setup.h here: -->
|
||||
|
||||
<set var="IS_MSVC_PRJ">$(FORMAT in ['msvc6prj','msevc4prj'])</set>
|
||||
<set var="IS_MSVC_PRJ">
|
||||
$(FORMAT in ['msvc6prj','msevc4prj','msvs2005prj'])
|
||||
</set>
|
||||
|
||||
<define-tag name="msvc-headers" rules="dll,lib">
|
||||
<if cond="IS_MSVC_PRJ">
|
||||
@@ -420,7 +422,7 @@ $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
|
||||
<set var="_custom_build_include_wx_msw_genrcdefs_h">
|
||||
Creating $(SETUPHDIR)\wx\msw\rcdefs.h
|
||||
|
||||
"$(SETUPHDIR)\wx\msw\rcdefs.h" : "$(DOLLAR)(SOURCE)" "$(DOLLAR)(SETUPHDIR)\wx\msw"
|
||||
"$(SETUPHDIR)\wx\msw\rcdefs.h" : "$(DOLLAR)(SOURCE)" "$(SETUPHDIR)\wx\msw"
|
||||
$(TAB)$(VC_COMPILER) /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
|
||||
</set>
|
||||
</if>
|
||||
|
||||
@@ -98,8 +98,8 @@ Accepted values: AMD64, IA64.
|
||||
<!-- FIXME: restore this once bakefile is fixed to not use
|
||||
/Gm /GZ (incompatible with /O2) w/ debug-info -->
|
||||
<set var="DEBUG_INFO_DEFAULT">
|
||||
<if cond="FORMAT in ['msvc','msvc6prj','msevc4prj']">1</if>
|
||||
<if cond="FORMAT not in ['msvc','msvc6prj','msevc4prj']">default</if>
|
||||
<if cond="FORMAT in ['msvc','msvc6prj','msevc4prj','msvs2005prj']">1</if>
|
||||
<if cond="FORMAT not in ['msvc','msvc6prj','msevc4prj','msvs2005prj']">default</if>
|
||||
</set>
|
||||
-->
|
||||
<set var="DEBUG_INFO_DEFAULT">default</set>
|
||||
@@ -231,8 +231,8 @@ Acts according to BUILD by default.
|
||||
|
||||
<!-- currently only VC++ can compile wxDebugReport which is in QA lib -->
|
||||
<set var="USE_QA_DEFAULT">
|
||||
<if cond="FORMAT in ['msvc','msvc6prj']">1</if>
|
||||
<if cond="FORMAT not in ['msvc','msvc6prj']">0</if>
|
||||
<if cond="FORMAT in ['msvc','msvc6prj','msvs2005prj']">1</if>
|
||||
<if cond="FORMAT not in ['msvc','msvc6prj','msvs2005prj']">0</if>
|
||||
</set>
|
||||
<option name="USE_QA">
|
||||
<values>0,1</values>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<!-- ...and when there are multiple libraries: -->
|
||||
<include file="multilib.bkl"/>
|
||||
|
||||
<if cond="FORMAT in ['msvc6prj','msevc4prj']">
|
||||
<if cond="FORMAT in ['msvc6prj','msevc4prj','msvs2005prj']">
|
||||
<set var="MSVC6PRJ_MERGED_TARGETS">
|
||||
<if cond="MONOLITHIC=='0'">$(MSVC6PRJ_MERGED_TARGETS_MULTILIB)</if>
|
||||
<if cond="MONOLITHIC=='1'">$(MSVC6PRJ_MERGED_TARGETS_MONOLIB)</if>
|
||||
|
||||
2
configure
vendored
2
configure
vendored
@@ -1805,7 +1805,7 @@ test -n "$target_alias" &&
|
||||
wx_major_version_number=2
|
||||
wx_minor_version_number=8
|
||||
wx_release_number=1
|
||||
wx_subrelease_number=0
|
||||
wx_subrelease_number=1
|
||||
|
||||
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
|
||||
WX_VERSION=$WX_RELEASE.$wx_release_number
|
||||
|
||||
17
configure.in
17
configure.in
@@ -35,7 +35,7 @@ dnl wx_release_number += 1
|
||||
wx_major_version_number=2
|
||||
wx_minor_version_number=8
|
||||
wx_release_number=1
|
||||
wx_subrelease_number=0
|
||||
wx_subrelease_number=1
|
||||
|
||||
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
|
||||
WX_VERSION=$WX_RELEASE.$wx_release_number
|
||||
@@ -2545,11 +2545,16 @@ fi
|
||||
|
||||
dnl check for C99 string to long long conversion functions, assume that if we
|
||||
dnl have the unsigned variants, then we have the signed ones as well
|
||||
dnl
|
||||
dnl at least under SGI these functions are only available in C99 code and not
|
||||
dnl in C++ so do these tests using C++ compiler
|
||||
AC_LANG_PUSH(C++)
|
||||
if test "wxUSE_UNICODE" = "yes"; then
|
||||
WX_CHECK_FUNCS(wcstoull)
|
||||
else
|
||||
WX_CHECK_FUNCS(strtoull)
|
||||
fi
|
||||
AC_LANG_POP()
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Optional libraries
|
||||
@@ -3204,12 +3209,12 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
|
||||
|
||||
dnl test for XIM support in libgdk
|
||||
AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
|
||||
fi
|
||||
|
||||
dnl we need poll() in src/gtk/app.cpp (we know that Darwin doesn't
|
||||
dnl have it but we do the check for the others)
|
||||
if test "$USE_DARWIN" != 1; then
|
||||
AC_CHECK_FUNCS(poll)
|
||||
dnl we need poll() in src/gtk1/app.cpp (we know that Darwin doesn't
|
||||
dnl have it but we do the check for the others)
|
||||
if test "$USE_DARWIN" != 1; then
|
||||
AC_CHECK_FUNCS(poll)
|
||||
fi
|
||||
fi
|
||||
|
||||
TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
|
||||
|
||||
@@ -791,9 +791,10 @@ public:
|
||||
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
|
||||
wxPopupWindow(parent, wxBORDER_NONE)
|
||||
{
|
||||
|
||||
SetBackgroundColour(*wxBLACK); // for our simple border
|
||||
|
||||
lv = new wxSTCListBox(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||
lv = new wxSTCListBox(parent, id, wxPoint(-50,-50), wxDefaultSize,
|
||||
wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER | wxBORDER_NONE);
|
||||
lv->SetCursor(wxCursor(wxCURSOR_ARROW));
|
||||
lv->InsertColumn(0, wxEmptyString);
|
||||
@@ -897,17 +898,27 @@ END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
||||
#else // wxUSE_POPUPWIN -----------------------------------
|
||||
#else // !wxUSE_POPUPWIN -----------------------------------
|
||||
|
||||
// A normal window to place the wxSTCListBox upon.
|
||||
class wxSTCListBoxWin : public wxWindow {
|
||||
// A normal window to place the wxSTCListBox upon, but make it behave as much
|
||||
// like a wxPopupWindow as possible
|
||||
class wxSTCListBoxWin : public wxFrame {
|
||||
private:
|
||||
wxListView* lv;
|
||||
CallBackAction doubleClickAction;
|
||||
void* doubleClickActionData;
|
||||
public:
|
||||
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) :
|
||||
wxWindow(parent, id, wxPoint(location.x, location.y), wxSize(0,0), wxSIMPLE_BORDER )
|
||||
wxFrame(parent, id, wxEmptyString, wxPoint(location.x, location.y), wxSize(0,0),
|
||||
wxFRAME_NO_TASKBAR
|
||||
| wxFRAME_FLOAT_ON_PARENT
|
||||
#ifdef __WXMAC__
|
||||
| wxPOPUP_WINDOW
|
||||
| wxNO_BORDER
|
||||
#else
|
||||
| wxSIMPLE_BORDER
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
lv = new wxSTCListBox(this, id, wxDefaultPosition, wxDefaultSize,
|
||||
@@ -928,7 +939,8 @@ public:
|
||||
// messages/events for the list control when Scintilla wants to
|
||||
// close it, so do a pending delete of it instead of destroying
|
||||
// immediately.
|
||||
bool Destroy() {
|
||||
bool Destroy()
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
// The bottom edge of this window is not getting properly
|
||||
// refreshed upon deletion, so help it out...
|
||||
@@ -943,7 +955,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
int IconWidth() {
|
||||
int IconWidth()
|
||||
{
|
||||
wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL);
|
||||
if (il != NULL) {
|
||||
int w, h;
|
||||
@@ -954,18 +967,22 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void SetDoubleClickAction(CallBackAction action, void *data) {
|
||||
void SetDoubleClickAction(CallBackAction action, void *data)
|
||||
{
|
||||
doubleClickAction = action;
|
||||
doubleClickActionData = data;
|
||||
}
|
||||
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
void OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
ActivateParent();
|
||||
GetParent()->SetFocus();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnSize(wxSizeEvent& event) {
|
||||
void OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// resize the child
|
||||
wxSize sz = GetClientSize();
|
||||
lv->SetSize(sz);
|
||||
@@ -976,15 +993,44 @@ public:
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void ActivateParent()
|
||||
{
|
||||
// Although we're a frame, we always want the parent to be active, so
|
||||
// raise it whenever we get shown, focused, etc.
|
||||
wxTopLevelWindow *frame = wxDynamicCast(
|
||||
wxGetTopLevelParent(GetParent()), wxTopLevelWindow);
|
||||
if (frame)
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO)
|
||||
{
|
||||
// convert coords to screen coords since we're a top-level window
|
||||
if (x != wxDefaultCoord) {
|
||||
GetParent()->ClientToScreen(&x, NULL);
|
||||
}
|
||||
if (y != wxDefaultCoord) {
|
||||
GetParent()->ClientToScreen(NULL, &y);
|
||||
}
|
||||
wxFrame::DoSetSize(x, y, width, height, sizeFlags);
|
||||
}
|
||||
|
||||
virtual bool Show(bool show = true)
|
||||
{
|
||||
bool rv = wxFrame::Show(show);
|
||||
if (rv && show)
|
||||
ActivateParent();
|
||||
#ifdef __WXMAC__
|
||||
virtual bool Show(bool show = true) {
|
||||
bool rv = wxWindow::Show(show);
|
||||
GetParent()->Refresh(false);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
void OnActivate(wxListEvent& WXUNUSED(event)) {
|
||||
void OnActivate(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
doubleClickAction(doubleClickActionData);
|
||||
}
|
||||
|
||||
@@ -1193,7 +1239,7 @@ void ListBoxImpl::Select(int n) {
|
||||
n = 0;
|
||||
select = false;
|
||||
}
|
||||
GETLB(id)->Focus(n);
|
||||
GETLB(id)->EnsureVisible(n);
|
||||
GETLB(id)->Select(n, select);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ void wxSTCDropTarget::OnLeave() {
|
||||
#define wxSTCCallTipBase wxPopupWindow
|
||||
#define param2 wxBORDER_NONE // popup's 2nd param is flags
|
||||
#else
|
||||
#define wxSTCCallTipBase wxWindow
|
||||
#define wxSTCCallTipBase wxFrame
|
||||
#define param2 -1 // wxWindow's 2nd param is ID
|
||||
#endif
|
||||
|
||||
@@ -95,8 +95,19 @@ void wxSTCDropTarget::OnLeave() {
|
||||
|
||||
class wxSTCCallTip : public wxSTCCallTipBase {
|
||||
public:
|
||||
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
|
||||
: wxSTCCallTipBase(parent, param2),
|
||||
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx) :
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
wxSTCCallTipBase(parent, wxBORDER_NONE),
|
||||
#else
|
||||
wxSTCCallTipBase(parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxFRAME_NO_TASKBAR
|
||||
| wxFRAME_FLOAT_ON_PARENT
|
||||
| wxBORDER_NONE
|
||||
#ifdef __WXMAC__
|
||||
| wxPOPUP_WINDOW
|
||||
#endif
|
||||
),
|
||||
#endif
|
||||
m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord)
|
||||
{
|
||||
}
|
||||
@@ -112,7 +123,8 @@ public:
|
||||
|
||||
bool AcceptsFocus() const { return false; }
|
||||
|
||||
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
|
||||
void OnPaint(wxPaintEvent& WXUNUSED(evt))
|
||||
{
|
||||
wxBufferedPaintDC dc(this);
|
||||
Surface* surfaceWindow = Surface::Allocate();
|
||||
surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
|
||||
@@ -121,22 +133,25 @@ public:
|
||||
delete surfaceWindow;
|
||||
}
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
void OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
GetParent()->SetFocus();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnLeftDown(wxMouseEvent& event) {
|
||||
void OnLeftDown(wxMouseEvent& event)
|
||||
{
|
||||
wxPoint pt = event.GetPosition();
|
||||
Point p(pt.x, pt.y);
|
||||
m_ct->MouseClick(p);
|
||||
m_swx->CallTipClick();
|
||||
}
|
||||
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) {
|
||||
int sizeFlags = wxSIZE_AUTO)
|
||||
{
|
||||
// convert coords to screen coords since we're a top-level window
|
||||
if (x != wxDefaultCoord) {
|
||||
m_cx = x;
|
||||
GetParent()->ClientToScreen(&x, NULL);
|
||||
@@ -147,9 +162,27 @@ public:
|
||||
}
|
||||
wxSTCCallTipBase::DoSetSize(x, y, width, height, sizeFlags);
|
||||
}
|
||||
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
#else
|
||||
virtual bool Show( bool show = true )
|
||||
{
|
||||
// Although we're a frame, we always want the parent to be active, so
|
||||
// raise it whenever we get shown.
|
||||
bool rv = wxSTCCallTipBase::Show(show);
|
||||
if (rv && show)
|
||||
{
|
||||
wxTopLevelWindow *frame = wxDynamicCast(
|
||||
wxGetTopLevelParent(GetParent()), wxTopLevelWindow);
|
||||
if (frame)
|
||||
frame->Raise();
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
wxPoint GetMyPosition() {
|
||||
wxPoint GetMyPosition()
|
||||
{
|
||||
return wxPoint(m_cx, m_cy);
|
||||
}
|
||||
|
||||
|
||||
18
debian/changelog
vendored
18
debian/changelog
vendored
@@ -1,3 +1,21 @@
|
||||
wxwidgets2.8 (2.8.1.1-0) unstable; urgency=low
|
||||
|
||||
* Fix compilation with wxUSE_STL=1
|
||||
* wxGrid::GetBestSize() returns same size the grid would have after AutoSize()
|
||||
* Added wxTreeCtrl::CollapseAll[Children]() and IsEmpty() (Francesco Montorsi)
|
||||
* Several RTL-related positioning fixes (Diaa Sami)
|
||||
* Fix wxConfig::DeleteGroup() for arguments with trailing slash (David Hart)
|
||||
* Fix memory leak in wxGrid::ShowCellEditControl() (Christian Sturmlechner)
|
||||
* Don't crash if command line is not valid UTF-8 (Unicode build only)
|
||||
* Added wxSizerFlags::Shaped() and FixedMinSize() methods
|
||||
* Added wxCSConv::IsOk() (Manuel Martin)
|
||||
* Added wxDateTime::GetDateOnly()
|
||||
* Made wxTextFile work with unseekable files again (David Hart)
|
||||
* Added wxCONFIG_USE_SUBDIR flag to wxFileConfig (Giuseppe Bilotta)
|
||||
* Added wxSearchCtrl::[Get|Set]DescriptiveText
|
||||
|
||||
-- Robin Dunn <robin@alldunn.com> Fri, 19 Jan 2007 12:02:52 -0800
|
||||
|
||||
wxwidgets2.8 (2.8.0.1-1) unstable; urgency=low
|
||||
|
||||
* No changes, just a different packager
|
||||
|
||||
@@ -17,7 +17,7 @@ DOCDIR=${WX_TEMP_DIR}/wxWidgets/docs/
|
||||
CURDATE=`date -I`
|
||||
|
||||
# build info
|
||||
BUILD_VERSION=2.8.1-rc1
|
||||
BUILD_VERSION=2.8.2
|
||||
BUILD_TAG=HEAD
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@ getfilelist(){
|
||||
filelist="$filelist mgl.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "dfb" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist dfb.rsp"
|
||||
fi
|
||||
|
||||
if [ $port = "gtk" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist gtk.rsp"
|
||||
fi
|
||||
@@ -124,7 +128,7 @@ dospinport(){
|
||||
mac)
|
||||
portname="Mac";;
|
||||
*)
|
||||
# for all the others (DFB, GTK, MGL, MSW, X11) just use the
|
||||
# for all the others (DFB, GTK, MGL, DFB, MSW, X11) just use the
|
||||
# upper-case version as they are abbreviations
|
||||
portname=`echo $port | tr '[a-z]' '[A-Z]'`;;
|
||||
esac
|
||||
@@ -187,6 +191,8 @@ prepareforrelease()
|
||||
cp $APPDIR/docs/mgl/readme.txt $APPDIR/readme-mgl.txt
|
||||
cp $APPDIR/docs/mgl/install.txt $APPDIR/install-mgl.txt
|
||||
|
||||
cp $APPDIR/docs/dfb/install.txt $APPDIR/install-dfb.txt
|
||||
|
||||
cp $APPDIR/docs/x11/readme.txt $APPDIR/readme-x11.txt
|
||||
cp $APPDIR/docs/x11/install.txt $APPDIR/install-x11.txt
|
||||
|
||||
@@ -285,6 +291,7 @@ fi
|
||||
|
||||
if [ "$SPINALL" = "1" ]; then
|
||||
dospinport "mgl"
|
||||
dospinport "dfb"
|
||||
dospinport "gtk"
|
||||
dospinport "x11"
|
||||
dospinport "motif"
|
||||
|
||||
@@ -21,7 +21,6 @@ do_build
|
||||
make prefix=$INSTALLDIR install
|
||||
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate prefix=$INSTALLDIR install
|
||||
make -C contrib/src/gizmos prefix=$INSTALLDIR install
|
||||
make -C contrib/src/stc prefix=$INSTALLDIR install
|
||||
fi
|
||||
|
||||
6
distrib/scripts/manifests/dfb.rsp
Normal file
6
distrib/scripts/manifests/dfb.rsp
Normal file
@@ -0,0 +1,6 @@
|
||||
install-dfb.txt
|
||||
|
||||
include/wx/dfb/*.h
|
||||
include/wx/dfb/private/*.h
|
||||
src/dfb/*.cpp
|
||||
docs/dfb/*.txt
|
||||
@@ -42,7 +42,7 @@ else
|
||||
cvs update -d -P
|
||||
fi
|
||||
#copy setup0.h setup.h for msw
|
||||
find . -name setup.h | xargs rm -rf
|
||||
rm include/wx/msw/setup.h
|
||||
cp include/wx/msw/setup0.h include/wx/msw/setup.h
|
||||
|
||||
# this is where we will store the wxAll tarball we create
|
||||
|
||||
@@ -53,6 +53,8 @@ docopydocs()
|
||||
cp $APPDIR/docs/mgl/readme.txt $DESTDIR/readme-mgl-$VERSION.txt
|
||||
cp $APPDIR/docs/mgl/install.txt $DESTDIR/install-mgl-$VERSION.txt
|
||||
|
||||
cp $APPDIR/docs/dfb/install.txt $DESTDIR/install-dfb-$VERSION.txt
|
||||
|
||||
cp $APPDIR/docs/cocoa/readme.txt $DESTDIR/readme-cocoa-$VERSION.txt
|
||||
cp $APPDIR/docs/cocoa/install.txt $DESTDIR/install-cocoa-$VERSION.txt
|
||||
|
||||
|
||||
@@ -88,6 +88,28 @@ Major new features in 2.8 release
|
||||
wxSearchCtrl, wxAboutBox, wxTreebook, tar streams.
|
||||
|
||||
|
||||
2.8.2
|
||||
-----
|
||||
|
||||
All:
|
||||
|
||||
- Added wxSizerFlags::Shaped() and FixedMinSize() methods
|
||||
- Added wxCSConv::IsOk() (Manuel Martin)
|
||||
- Added wxDateTime::GetDateOnly()
|
||||
- Made wxTextFile work with unseekable files again (David Hart)
|
||||
- Added wxCONFIG_USE_SUBDIR flag to wxFileConfig (Giuseppe Bilotta)
|
||||
- Added wxSearchCtrl::[Get|Set]DescriptiveText
|
||||
|
||||
wxMSW
|
||||
|
||||
- Fix lack of spin control update event when control lost focus
|
||||
- Corrected drawing of bitmaps for disabled menu items
|
||||
|
||||
wxMac
|
||||
|
||||
- Added support for the wxFRAME_FLOAT_ON_PARENT style
|
||||
|
||||
|
||||
2.8.1
|
||||
-----
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
wxWidgets 2.8 for GTK+ installation
|
||||
-----------------------------------
|
||||
wxWidgets for GTK+ installation
|
||||
-------------------------------
|
||||
|
||||
IMPORTANT NOTE:
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Welcome to wxWidgets 2.8.0 for GTK+
|
||||
-----------------------------------
|
||||
Welcome to wxWidgets for GTK+
|
||||
-----------------------------
|
||||
|
||||
You have downloaded version 2.8 of the GTK+ port of the
|
||||
wxWidgets GUI library.
|
||||
You have downloaded the GTK+ port of the wxWidgets GUI library.
|
||||
|
||||
It is recommended to use at least GTK+ 2.2.3 to get the
|
||||
most out of wxWidgets and some features are only available
|
||||
|
||||
@@ -55,15 +55,16 @@ Copy constructor.
|
||||
\membersection{wxAuiPaneInfo::BestSize}\label{wxauipaneinfobestsize}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{BestSize}{\param{const wxSize\& }{size}}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{BestSize}{\param{int }{x}, \param{int }{y}}
|
||||
|
||||
BestSize() sets the ideal size for the pane. The docking manager will attempt to use this size as much as possible when docking or floating the pane.
|
||||
BestSize() sets the ideal size for the pane. The docking manager will attempt to use this size as much as possible when docking or floating the pane.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Bottom}\label{wxauipaneinfobottom}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Bottom}{\void}
|
||||
|
||||
Bottom() sets the pane dock position to the bottom side of the frame. This is
|
||||
Bottom() sets the pane dock position to the bottom side of the frame. This is
|
||||
the same thing as calling Direction(wxAUI\_DOCK\_BOTTOM).
|
||||
|
||||
\membersection{wxAuiPaneInfo::BottomDockable}\label{wxauipaneinfobottomdockable}
|
||||
@@ -82,36 +83,26 @@ Caption() sets the caption of the pane.
|
||||
|
||||
\func{wxAuiPaneInfo\&}{CaptionVisible}{\param{bool }{visible = true}}
|
||||
|
||||
CaptionVisible indicates that a pane caption should be visible. If false, no pane caption is drawn.
|
||||
CaptionVisible indicates that a pane caption should be visible. If false, no pane caption is drawn.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Centre}\label{wxauipaneinfocentre}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Centre}{\void}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Center}{\void}
|
||||
|
||||
Center() sets the pane dock position to the left side of the frame. This is
|
||||
the same thing as calling Direction(wxAUI\_DOCK\_CENTRE).
|
||||
Center() sets the pane dock position to the left side of the frame.
|
||||
The centre pane is the space in the middle after all border panes (left, top, right, bottom) are subtracted from the layout.
|
||||
|
||||
This is the same thing as calling Direction(wxAUI\_DOCK\_CENTRE).
|
||||
|
||||
\membersection{wxAuiPaneInfo::CentrePane}\label{wxauipaneinfocentrepane}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{CentrePane}{\void}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{CenterPane}{\void}
|
||||
|
||||
CentrePane() specifies that the pane should adopt the default centre pane settings.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Centre}\label{wxauipaneinfocentre}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Centre}{\void}
|
||||
\func{wxAuiPaneInfo\&}{Center}{\void}
|
||||
|
||||
Centre() sets the pane to the center position of the frame. The centre pane is the space in the middle after all border panes (left, top, right, bottom) are subtracted from the layout.
|
||||
|
||||
\membersection{wxAuiPaneInfo::CentrePane}\label{wxauipaneinfocentrepane}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{CentrePane}{\void}
|
||||
\func{wxAuiPaneInfo\&}{CenterPane}{\void}
|
||||
|
||||
CentrePane() specifies that the pane should adopt the default center pane settings. Centre panes usually do not have caption bars. This function provides an easy way of preparing a pane to be displayed in the center dock position.
|
||||
CentrePane() specifies that the pane should adopt the default center pane settings. Centre panes usually do not have caption bars. This function provides an easy way of preparing a pane to be displayed in the center dock position.
|
||||
|
||||
\membersection{wxAuiPaneInfo::CloseButton}\label{wxauipaneinfoclosebutton}
|
||||
|
||||
@@ -129,13 +120,13 @@ DefaultPane() specifies that the pane should adopt the default pane settings.
|
||||
|
||||
\func{wxAuiPaneInfo\&}{DestroyOnClose}{\param{bool }{b = true}}
|
||||
|
||||
DestroyOnClose() indicates whether a pane should be detroyed when it is closed. Normally a pane is simply hidden when the close button is clicked. Setting DestroyOnClose to true will cause the window to be destroyed when the user clicks the pane's close button.
|
||||
DestroyOnClose() indicates whether a pane should be detroyed when it is closed. Normally a pane is simply hidden when the close button is clicked. Setting DestroyOnClose to true will cause the window to be destroyed when the user clicks the pane's close button.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Direction}\label{wxauipaneinfodirection}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Direction}{\param{int }{direction}}
|
||||
|
||||
Direction() determines the direction of the docked pane. It is functionally the same as calling Left(), Right(), Top() or Bottom(), except that docking direction may be specified programmatically via the parameter.
|
||||
Direction() determines the direction of the docked pane. It is functionally the same as calling Left(), Right(), Top() or Bottom(), except that docking direction may be specified programmatically via the parameter.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Dock}\label{wxauipaneinfodock}
|
||||
|
||||
@@ -146,13 +137,13 @@ Direction() determines the direction of the docked pane. It is functionally the
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Dockable}{\param{bool }{b = true}}
|
||||
|
||||
Dockable() specifies whether a frame can be docked or not. It is the same as specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b).
|
||||
Dockable() specifies whether a frame can be docked or not. It is the same as specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b).
|
||||
|
||||
\membersection{wxAuiPaneInfo::Fixed}\label{wxauipaneinfofixed}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Fixed}{\void}
|
||||
|
||||
Fixed() forces a pane to be fixed size so that it cannot be resized. After calling Fixed(), IsFixed() will return true.
|
||||
Fixed() forces a pane to be fixed size so that it cannot be resized. After calling Fixed(), IsFixed() will return true.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Float}\label{wxauipaneinfofloat}
|
||||
|
||||
@@ -169,6 +160,7 @@ Floatable() sets whether the user will be able to undock a pane and turn it into
|
||||
\membersection{wxAuiPaneInfo::FloatingPosition}\label{wxauipaneinfofloatingposition}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{FloatingPosition}{\param{const wxPoint\& }{pos}}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{FloatingPosition}{\param{int }{x}, \param{int }{y}}
|
||||
|
||||
FloatingPosition() sets the position of the floating pane.
|
||||
@@ -176,6 +168,7 @@ FloatingPosition() sets the position of the floating pane.
|
||||
\membersection{wxAuiPaneInfo::FloatingSize}\label{wxauipaneinfofloatingsize}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{FloatingSize}{\param{const wxSize\& }{size}}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{FloatingSize}{\param{int }{x}, \param{int }{y}}
|
||||
|
||||
FloatingSize() sets the size of the floating pane.
|
||||
@@ -298,7 +291,7 @@ IsMoveable() returns true if the docked frame can be undocked or moved to anothe
|
||||
|
||||
\constfunc{bool}{IsOk}{\void}
|
||||
|
||||
IsOk() returns true if the wxAuiPaneInfo structure is valid. A pane structure is valid if it has an associated window.
|
||||
IsOk() returns true if the wxAuiPaneInfo structure is valid. A pane structure is valid if it has an associated window.
|
||||
|
||||
\membersection{wxAuiPaneInfo::IsResizable}\label{wxauipaneinfoisresizable}
|
||||
|
||||
@@ -334,13 +327,13 @@ IsTopDockable() returns true if the pane can be docked at the top of the managed
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Layer}{\param{int }{layer}}
|
||||
|
||||
Layer() determines the layer of the docked pane. The dock layer is similar to an onion, the inner-most layer being layer 0. Each shell moving in the outward direction has a higher layer number. This allows for more complex docking layout formation.
|
||||
Layer() determines the layer of the docked pane. The dock layer is similar to an onion, the inner-most layer being layer 0. Each shell moving in the outward direction has a higher layer number. This allows for more complex docking layout formation.
|
||||
|
||||
\membersection{wxAuiPaneInfo::Left}\label{wxauipaneinfoleft}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Left}{\void}
|
||||
|
||||
Left() sets the pane dock position to the left side of the frame. This is the
|
||||
Left() sets the pane dock position to the left side of the frame. This is the
|
||||
same thing as calling Direction(wxAUI\_DOCK\_LEFT).
|
||||
|
||||
\membersection{wxAuiPaneInfo::LeftDockable}\label{wxauipaneinfoleftdockable}
|
||||
@@ -352,6 +345,7 @@ LeftDockable() indicates whether a pane can be docked on the left of the frame.
|
||||
\membersection{wxAuiPaneInfo::MaxSize}\label{wxauipaneinfomaxsize}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{MaxSize}{\param{const wxSize\& }{size}}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{MaxSize}{\param{int }{x}, \param{int }{y}}
|
||||
|
||||
MaxSize() sets the maximum size of the pane.
|
||||
@@ -365,9 +359,10 @@ MaximizeButton() indicates that a maximize button should be drawn for the pane.
|
||||
\membersection{wxAuiPaneInfo::MinSize}\label{wxauipaneinfominsize}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{MinSize}{\param{const wxSize\& }{size}}
|
||||
|
||||
\func{wxAuiPaneInfo\&}{MinSize}{\param{int }{x}, \param{int }{y}}
|
||||
|
||||
MinSize() sets the minimum size of the pane. Please note that this is only partially supported as of this writing.
|
||||
MinSize() sets the minimum size of the pane. Please note that this is only partially supported as of this writing.
|
||||
|
||||
\membersection{wxAuiPaneInfo::MinimizeButton}\label{wxauipaneinfominimizebutton}
|
||||
|
||||
@@ -385,7 +380,7 @@ Movable indicates whether a frame can be moved.
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Name}{\param{const wxString\& }{n}}
|
||||
|
||||
Name() sets the name of the pane so it can be referenced in lookup functions. If a name is not specified by the user, a random name is assigned to the pane when it is added to the manager.
|
||||
Name() sets the name of the pane so it can be referenced in lookup functions. If a name is not specified by the user, a random name is assigned to the pane when it is added to the manager.
|
||||
|
||||
\membersection{wxAuiPaneInfo::PaneBorder}\label{wxauipaneinfopaneborder}
|
||||
|
||||
@@ -409,7 +404,7 @@ Position() determines the position of the docked pane.
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Resizable}{\param{bool }{resizable = true}}
|
||||
|
||||
Resizable() allows a pane to be resized if the parameter is true, and forces it to be a fixed size if the parameter is false. This is simply an antonym for Fixed().
|
||||
Resizable() allows a pane to be resized if the parameter is true, and forces it to be a fixed size if the parameter is false. This is simply an antonym for Fixed().
|
||||
|
||||
\membersection{wxAuiPaneInfo::Right}\label{wxauipaneinforight}
|
||||
|
||||
@@ -470,7 +465,7 @@ TopDockable() indicates whether a pane can be docked at the top of the frame.
|
||||
|
||||
\func{wxAuiPaneInfo\&}{Window}{\param{wxWindow* }{w}}
|
||||
|
||||
Window() assigns the window pointer that the wxAuiPaneInfo should use. This normally does not need to be specified, as the window pointer is automatically assigned to the wxAuiPaneInfo structure as soon as it is added to the manager.
|
||||
Window() assigns the window pointer that the wxAuiPaneInfo should use. This normally does not need to be specified, as the window pointer is automatically assigned to the wxAuiPaneInfo structure as soon as it is added to the manager.
|
||||
|
||||
\membersection{wxAuiPaneInfo::operator=}\label{wxauipaneinfooperatorassign}
|
||||
|
||||
|
||||
@@ -377,18 +377,30 @@ this is not present, but required, the application name will be used instead.}
|
||||
|
||||
\docparam{style}{Can be one of wxCONFIG\_USE\_LOCAL\_FILE and
|
||||
wxCONFIG\_USE\_GLOBAL\_FILE. The style interpretation depends on the config
|
||||
class and is ignored by some. For wxFileConfig, these styles determine whether
|
||||
a local or global config file is created or used. If the flag is present but
|
||||
the parameter is empty, the parameter will be set to a default. If the
|
||||
parameter is present but the style flag not, the relevant flag will be added
|
||||
to the style. For wxFileConfig you can also add wxCONFIG\_USE\_RELATIVE\_PATH
|
||||
by logically or'ing it to either of the \_FILE options to tell wxFileConfig to
|
||||
use relative instead of absolute paths. For wxFileConfig, you can also
|
||||
add wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS which will turn off character
|
||||
escaping for the values of entries stored in the config file: for example
|
||||
a {\it foo} key with some backslash characters will be stored as {\tt foo=C:$\backslash$mydir} instead
|
||||
of the usual storage of {\tt foo=C:$\backslash\backslash$mydir}.
|
||||
For wxRegConfig, this flag refers to HKLM, and provides read-only access.
|
||||
class and is ignored by some implementations. For wxFileConfig, these styles
|
||||
determine whether a local or global config file is created or used. If the
|
||||
flag is present but the parameter is empty, the parameter will be set to a
|
||||
default. If the parameter is present but the style flag not, the relevant flag
|
||||
will be added to the style. For wxRegConfig, thie GLOBAL flag refers to HKLM
|
||||
key while LOCAL one is for the usual HKCU one.
|
||||
|
||||
For wxFileConfig you can also add wxCONFIG\_USE\_RELATIVE\_PATH by logically
|
||||
or'ing it to either of the \_FILE options to tell wxFileConfig to use relative
|
||||
instead of absolute paths.
|
||||
|
||||
On non-VMS Unix systems, the default local configuration file is \tt{~/.appname}.
|
||||
However, this path may be also used as user data directory
|
||||
(see \helpref{wxStandardPaths::GetUserDataDir}{wxstandardpathsgetuserdatadir}) if
|
||||
the application has several data files. In this case wxCONFIG\_USE\_SUBDIR
|
||||
flag, which changes the default local configuration file to \tt{~/.appname/appname}
|
||||
should be used. Notice that this flag is ignored on non-Unix system, including
|
||||
VMS, or if a non-default \textit{localFilename} is provided. \newsince{2.8.2}
|
||||
|
||||
For wxFileConfig, you can also add wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS which
|
||||
will turn off character escaping for the values of entries stored in the config
|
||||
file: for example a {\it foo} key with some backslash characters will be stored
|
||||
as {\tt foo=C:$\backslash$mydir} instead of the usual storage of {\tt
|
||||
foo=C:$\backslash\backslash$mydir}.
|
||||
|
||||
The wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS style can be helpful if your config
|
||||
file must be read or written to by a non-wxWidgets program (which might not
|
||||
|
||||
@@ -32,8 +32,8 @@ default user character set.
|
||||
\func{}{wxCSConv}{\param{wxFontEncoding }{encoding}}
|
||||
|
||||
Constructor. You may specify either the name of the character set you want to
|
||||
convert from/to or an encoding constant. If the character set name is not
|
||||
recognized, ISO 8859-1 is used as fall back.
|
||||
convert from/to or an encoding constant. If the character set name (or the
|
||||
encoding) is not recognized, ISO 8859-1 is used as fall back.
|
||||
|
||||
|
||||
\membersection{wxCSConv::\destruct{wxCSConv}}\label{wxcsconvdtor}
|
||||
@@ -43,12 +43,26 @@ recognized, ISO 8859-1 is used as fall back.
|
||||
Destructor frees any resources needed to perform the conversion.
|
||||
|
||||
|
||||
\membersection{wxCSConv::IsOk}\label{wxcsconvisok}
|
||||
|
||||
\constfunc{bool}{IsOk}{\void}
|
||||
|
||||
Returns \true if the charset (or the encoding) given at constructor is really
|
||||
available to use. Returns \false if ISO 8859-1 will be used instead.
|
||||
|
||||
Note this does \emph{not} mean that a given string will be correctly converted.
|
||||
A malformed string may still make conversion functions return \texttt{wxCONV\_FAILED}.
|
||||
|
||||
\newsince{2.8.2}
|
||||
|
||||
|
||||
\membersection{wxCSConv::MB2WC}\label{wxcsconvmb2wc}
|
||||
|
||||
\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
|
||||
|
||||
Converts from the selected character set to Unicode. Returns length of string written to destination buffer.
|
||||
|
||||
|
||||
\membersection{wxCSConv::WC2MB}\label{wxcsconvwc2mb}
|
||||
|
||||
\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
|
||||
|
||||
@@ -862,6 +862,20 @@ Same as \helpref{Set}{wxdatetimesettm}.
|
||||
Returns {\tt true} if the object represents a valid time moment.
|
||||
|
||||
|
||||
\membersection{wxDateTime::GetDateOnly}\label{wxdatetimegetdateonly}
|
||||
|
||||
\constfunc{wxDateTime}{GetDateOnly}{\void}
|
||||
|
||||
Returns the object having the same date component as this one but time of
|
||||
00:00:00.
|
||||
|
||||
\newsince{2.8.2}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{ResetTime}{wxdatetimeresettime}
|
||||
|
||||
|
||||
\membersection{wxDateTime::GetTm}\label{wxdatetimegettm}
|
||||
|
||||
\constfunc{Tm}{GetTm}{\param{const TimeZone\& }{tz = Local}}
|
||||
|
||||
@@ -89,6 +89,13 @@ Appends the files in the history list, to all menus managed by the file history
|
||||
Appends the files in the history list, to the given menu only.
|
||||
|
||||
|
||||
\membersection{wxFileHistory::GetBaseId}\label{wxfilehistorygetbaseid}
|
||||
|
||||
\constfunc{wxWindowID}{GetBaseId}{\void}
|
||||
|
||||
Returns the base identifier for the range used for appending items.
|
||||
|
||||
|
||||
\membersection{wxFileHistory::GetCount}\label{wxfilehistorygetcount}
|
||||
|
||||
\constfunc{size\_t}{GetCount}{\void}
|
||||
@@ -157,6 +164,13 @@ explicitly by the application.
|
||||
\helpref{wxConfig}{wxconfigbase}
|
||||
|
||||
|
||||
\membersection{wxFileHistory::SetBaseId}\label{wxfilehistorysetbaseid}
|
||||
|
||||
\func{void}{SetBaseId}{\param{wxWindowID}{ baseId}}
|
||||
|
||||
Sets the base identifier for the range used for appending items.
|
||||
|
||||
|
||||
\membersection{wxFileHistory::UseMenu}\label{wxfilehistoryusemenu}
|
||||
|
||||
\func{void}{UseMenu}{\param{wxMenu* }{menu}}
|
||||
|
||||
@@ -186,17 +186,17 @@ the embedded window to be destroyed independently of the help controller.
|
||||
|
||||
\func{}{wxHtmlHelpWindow}{\param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
\func{}{wxHtmlHelpWindow}{\param{wxWindow* }{parent}, \param{int }{wxWindowID}, \param{int }{style = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
\func{}{wxHtmlHelpWindow}{\param{wxWindow* }{parent}, \param{int }{wxWindowID}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ pos = wxDefaultSize}, \param{int }{style = wxTAB\_TRAVERSAL|wxTAB\_wxNO_BORDER}, \param{int }{helpStyle = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
Constructor. For the values of {\it style}, please see the documentation for \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}.
|
||||
Constructor. For the values of {\it helpStyle}, please see the documentation for \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}.
|
||||
|
||||
\membersection{wxHtmlHelpWindow::Create}\label{wxhtmlhelpwindowcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{title = wxEmptyString}, \param{int }{style = wxHF\_DEFAULT\_STYLE}}
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ pos = wxDefaultSize}, \param{int }{style = wxTAB\_TRAVERSAL|wxTAB\_wxNO_BORDER}, \param{int }{helpStyle = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
Creates the frame. See \helpref{the constructor}{wxhtmlhelpwindowwxhtmlhelpwindow}
|
||||
Creates the help window. See \helpref{the constructor}{wxhtmlhelpwindowwxhtmlhelpwindow}
|
||||
for a description of the parameters.
|
||||
|
||||
\membersection{wxHtmlHelpWindow::CreateContents}\label{wxhtmlhelpwindowcreatecontents}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
}}
|
||||
\winhelpignore{\author{Julian Smart, Robert Roebling, Vadim Zeitlin,
|
||||
Robin Dunn, et al}
|
||||
\date{December, 2006}
|
||||
\date{January, 2007}
|
||||
}
|
||||
\makeindex
|
||||
\begin{document}
|
||||
|
||||
@@ -218,20 +218,21 @@ return type (without const).
|
||||
|
||||
\membersection{wxMBConv::FromWChar}\label{wxmbconvfromwchar}
|
||||
|
||||
\constfunc{virtual size\_t}{FromWChar}{\param{wchar\_t *}{dst}, \param{size\_t }{dstLen}, \param{const char *}{src}, \param{size\_t }{srcLen = $-1$}}
|
||||
\constfunc{virtual size\_t}{FromWChar}{\param{wchar\_t *}{dst}, \param{size\_t }{dstLen}, \param{const char *}{src}, \param{size\_t }{srcLen = wxNO\_LEN}}
|
||||
|
||||
The most general function for converting a multibyte string to a wide string.
|
||||
The main case is when \arg{dst} is not \NULL and \arg{srcLen} is not $-1$: then
|
||||
The main case is when \arg{dst} is not \NULL and \arg{srcLen} is not
|
||||
\texttt{wxNO\_LEN} (which is defined as \texttt{(size\_t)$-1$}): then
|
||||
the function converts exactly \arg{srcLen} bytes starting at \arg{src} into
|
||||
wide string which it output to \arg{dst}. If the length of the resulting wide
|
||||
string is greater than \arg{dstLen}, an error is returned. Note that if
|
||||
\arg{srcLen} bytes don't include \NUL characters, the resulting wide string is
|
||||
not \NUL-terminated neither.
|
||||
|
||||
If \arg{srcLen} is $-1$, the function supposes that the string is properly
|
||||
(i.e. as necessary for the encoding handled by this conversion) \NUL-terminated
|
||||
and converts the entire string, including any trailing \NUL bytes. In this case
|
||||
the wide string is also \NUL-terminated.
|
||||
If \arg{srcLen} is \texttt{wxNO\_LEN}, the function supposes that the string is
|
||||
properly (i.e. as necessary for the encoding handled by this conversion)
|
||||
\NUL-terminated and converts the entire string, including any trailing \NUL
|
||||
bytes. In this case the wide string is also \NUL-terminated.
|
||||
|
||||
Finally, if \arg{dst} is \NULL, the function returns the length of the needed
|
||||
buffer.
|
||||
@@ -262,12 +263,13 @@ trailing \NUL characters for any encoding.
|
||||
This function returns $1$ for most of the multibyte encodings in which the
|
||||
string is terminated by a single \NUL, $2$ for UTF-16 and $4$ for UTF-32 for
|
||||
which the string is terminated with $2$ and $4$ \NUL characters respectively.
|
||||
The other cases are not currently supported and $-1$ is returned for them.
|
||||
The other cases are not currently supported and \texttt{wxCONV\_FAILED}
|
||||
(defined as $-1$) is returned for them.
|
||||
|
||||
|
||||
\membersection{wxMBConv::ToWChar}\label{wxmbconvtowchar}
|
||||
|
||||
\constfunc{virtual size\_t}{ToWChar}{\param{char\_t *}{dst}, \param{size\_t }{dstLen}, \param{const wchar\_t *}{src}, \param{size\_t }{srcLen = $-1$}}
|
||||
\constfunc{virtual size\_t}{ToWChar}{\param{char\_t *}{dst}, \param{size\_t }{dstLen}, \param{const wchar\_t *}{src}, \param{size\_t }{srcLen = wxNO\_LEN}}
|
||||
|
||||
This function has the same semantics as \helpref{FromWChar}{wxmbconvfromwchar}
|
||||
except that it converts a wide string to multibyte one.
|
||||
|
||||
@@ -670,6 +670,14 @@ Aligns the object to the left, shortcut for \texttt{Align(wxALIGN\_LEFT)}
|
||||
\helpref{Align}{wxsizerflagsalign}
|
||||
|
||||
|
||||
\membersection{wxSizerFlags::FixedMinSize}\label{wxsizerflagsfixedminsize}
|
||||
|
||||
\func{wxSizerFlags\& }{FixedMinSize}{\void}
|
||||
|
||||
Set the \texttt{wxFIXED\_MINSIZE} flag which indicates that the initial size of
|
||||
the window should be also set as its minimal size.
|
||||
|
||||
|
||||
\membersection{wxSizerFlags::Proportion}\label{wxsizerflagsproportion}
|
||||
|
||||
\func{wxSizerFlags\& }{Proportion}{\param{int }{proportion = 0}}
|
||||
@@ -688,6 +696,14 @@ Aligns the object to the right, shortcut for \texttt{Align(wxALIGN\_RIGHT)}
|
||||
\helpref{Align}{wxsizerflagsalign}
|
||||
|
||||
|
||||
\membersection{wxSizerFlags::Shaped}\label{wxsizerflagsshaped}
|
||||
|
||||
\func{wxSizerFlags\& }{Shaped}{\void}
|
||||
|
||||
Set the \texttt{wx\_SHAPED} flag which indicates that the elements should
|
||||
always keep the fixed width to height ratio equal to its original value.
|
||||
|
||||
|
||||
\membersection{wxSizerFlags::TripleBorder}\label{wxsizerflagstriplebleborder}
|
||||
|
||||
\func{wxSizerFlags\& }{TripleBorder}{\param{int }{direction = wxALL}}
|
||||
|
||||
@@ -290,6 +290,11 @@ others are not.
|
||||
|
||||
\helpref{wxToolBar::AddTool}{wxtoolbaraddtool}
|
||||
|
||||
\membersection{wxToolBar::ClearTools}\label{wxtoolbarcleartools}
|
||||
|
||||
\func{void}{ClearTools}{\void}
|
||||
|
||||
Deletes all the tools in the toolbar.
|
||||
|
||||
\membersection{wxToolBar::DeleteTool}\label{wxtoolbardeletetool}
|
||||
|
||||
@@ -379,6 +384,13 @@ A pointer to a tool if a tool is found, or \NULL otherwise.
|
||||
Currently not implemented in wxGTK (always returns \NULL there).
|
||||
|
||||
|
||||
\membersection{wxToolBar::GetToolsCount}\label{wxtoolbargettoolscount}
|
||||
|
||||
\constfunc{int}{GetToolsCount}{\void}
|
||||
|
||||
Returns the number of tools in the toolbar.
|
||||
|
||||
|
||||
\membersection{wxToolBar::GetToolSize}\label{wxtoolbargettoolsize}
|
||||
|
||||
\func{wxSize}{GetToolSize}{\void}
|
||||
|
||||
@@ -1074,7 +1074,7 @@ None
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTreeItemCtrl}{wxtreeitemctrl}, \helpref{wxTreeItemData}{wxtreeitemdata},\\
|
||||
\helpref{wxTreeCtrl}{wxtreectrl}, \helpref{wxTreeItemData}{wxtreeitemdata},\\
|
||||
\helpref{wxTreeCtrl overview}{wxtreectrloverview}
|
||||
|
||||
|
||||
@@ -1085,7 +1085,7 @@ None
|
||||
\func{}{wxTreeItemId}{\void}
|
||||
|
||||
Default constructor. wxTreemItemIds are not meant to be constructed explicitly by
|
||||
the user; they are returned by the \helpref{wxTreeItemCtrl}{wxtreeitemctrl} functions instead.
|
||||
the user; they are returned by the \helpref{wxTreeCtrl}{wxtreectrl} functions instead.
|
||||
|
||||
|
||||
\membersection{wxTreeItemId::IsOk}\label{wxtreeitemidisok}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
wxWidgets 2.8.0 for Mac installation
|
||||
------------------------------------
|
||||
wxWidgets for Mac installation
|
||||
------------------------------
|
||||
|
||||
On MacOS X, you can download Apple's free developer tools (gcc
|
||||
and associated headers and libraries, such as the Carbon API).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Welcome to wxWidgets/Mac 2.8.2
|
||||
Welcome to wxWidgets/Mac
|
||||
|
||||
More Information is available from the wxWidgets project home page at
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
Welcome to wxWidgets/MGL 2.8.0
|
||||
Welcome to wxWidgets/MGL
|
||||
|
||||
You have downloaded version 2.8.0 of the MGL port of
|
||||
the wxWidgets GUI library. This runs on top of SciTech MGL library
|
||||
(http://www.scitechsoft.com/) that is available for variety of
|
||||
operating systems and comes with support for embedded devices.
|
||||
You have downloaded the MGL port of the wxWidgets GUI library.
|
||||
This runs on top of SciTech MGL library (http://www.scitechsoft.com/)
|
||||
that is available for variety of operating systems and comes with support
|
||||
for embedded devices.
|
||||
|
||||
More information about the wxWidgets project as a whole
|
||||
can be found at:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
wxWidgets 2.8.0 for Motif installation
|
||||
------------------------------------
|
||||
wxWidgets for Motif installation
|
||||
--------------------------------
|
||||
|
||||
IMPORTANT NOTE:
|
||||
|
||||
@@ -11,7 +11,7 @@ IMPORTANT NOTE:
|
||||
|
||||
When sending bug reports tell us what version of wxWidgets you are
|
||||
using (including the beta) and what compiler on what system. One
|
||||
example: wxMotif 2.8.0, gcc 2.95.4, Redhat 6.1
|
||||
example: wxMotif 2.8.1, gcc 2.95.4, Redhat 6.1
|
||||
|
||||
First steps
|
||||
-----------
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
Welcome to wxWidgets/Motif 2.8.0
|
||||
Welcome to wxWidgets/Motif
|
||||
|
||||
You have downloaded version 2.8.0 of the Motif port of
|
||||
the wxWidgets GUI library.
|
||||
You have downloaded the Motif port of the wxWidgets GUI library.
|
||||
|
||||
More information about the wxWidgets project as a whole
|
||||
can be found at:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Installing wxWidgets 2.8.0
|
||||
Installing wxWidgets for Windows
|
||||
-----------------------------------------------------------
|
||||
|
||||
This is wxWidgets 2.8.0 for Microsoft Windows 9x/ME, Windows NT,
|
||||
This is wxWidgets for Microsoft Windows 9x/ME, Windows NT,
|
||||
Windows 2000, Windows XP and Windows CE.
|
||||
|
||||
These installation notes can be found in docs/msw/install.txt
|
||||
@@ -368,7 +368,7 @@ Metrowerks CodeWarrior compilation
|
||||
** The authoritative list of files is in build/bakefiles/files.bkl
|
||||
|
||||
1. CodeWarrior Pro 7 project files in XML format are already
|
||||
included in wxMSW-2.8.0.zip and the setup version.
|
||||
included in wxMSW-2.8.x.zip and the setup version.
|
||||
|
||||
2. Review the file include\wx\msw\setup.h (or include\wx\msw\setup0.h if
|
||||
you are working from the CVS version) to make sure the settings reflect
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
=================================================
|
||||
Welcome to wxWidgets/CE 2.8.0
|
||||
Welcome to wxWidgets/CE
|
||||
=================================================
|
||||
|
||||
You have downloaded version 2.8.0 of the Windows CE port of
|
||||
the wxWidgets GUI library. This runs on Pocket PC 2002/2003,
|
||||
Smartphone 2002/2003, Windows CE .NET 4.x, and Windows Mobile 5.
|
||||
You have downloaded the Windows CE port of the wxWidgets GUI library.
|
||||
This runs on Pocket PC 2002/2003, Smartphone 2002/2003,
|
||||
Windows CE .NET 4.x, and Windows Mobile 5.
|
||||
|
||||
More information about the wxWidgets project as a whole
|
||||
can be found at:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Installing wxWidgets 2.8.0
|
||||
--------------------------
|
||||
Installing wxWidgets
|
||||
--------------------
|
||||
|
||||
This is wxWidgets 2.8.0 for IBM OS/2 Warp3 and Warp4. This is an unstable
|
||||
This is wxWidgets for IBM OS/2 Warp3 and Warp4. This is an unstable
|
||||
development release and OS/2 is considered to be in beta.
|
||||
|
||||
IMPORTANT NOTE: If you experience problems installing, please
|
||||
|
||||
@@ -46,8 +46,14 @@ The changes that are NOT binary compatible:
|
||||
even a default one)
|
||||
- Changing the order of the virtual functions in a class
|
||||
["switching" them, etc.]
|
||||
- Changing access privileges to a function (protected to private etc.)
|
||||
[unlike KDE we need to support windows so this is not allowed]
|
||||
- Changing access privileges of a function: some compilers (among which MSVC)
|
||||
use the function access specifier in its mangled name. Moreover, while
|
||||
changing a private function to public should be compatible (as the old
|
||||
symbol can't be referenced from outside the library anyhow), changing a
|
||||
virtual private function to public is NOT compatible because the old symbol
|
||||
is referenced by the virtual tables in the executable code and so an old
|
||||
program compiled with MSVC wouldn't start up with a new DLL even if it
|
||||
doesn't use the affected symbol at all!
|
||||
- Adding a member variable
|
||||
- Changing the order of non-static member variables
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
Welcome to wxWidgets/Wine 2.8.0
|
||||
Welcome to wxWidgets/Wine
|
||||
|
||||
You have downloaded version 2.8.0 of the WINE port of
|
||||
the wxWidgets GUI library.
|
||||
You have downloaded the WINE port of the wxWidgets GUI library.
|
||||
|
||||
Information on how to install can be found in the file
|
||||
install.txt.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
wxWidgets 2.8.0 for X11 installation
|
||||
------------------------------------
|
||||
wxWidgets for X11 installation
|
||||
------------------------------
|
||||
|
||||
IMPORTANT NOTE:
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
Welcome to wxWidgets/X11 2.8.0
|
||||
Welcome to wxWidgets/X11
|
||||
|
||||
You have downloaded version 2.8.0 of the X11 port of
|
||||
the wxWidgets GUI library. This runs on X11 with no
|
||||
Motif, Xt, GTK+ or any other standard widget set --
|
||||
instead it uses the wxUniversal widgets. The intention
|
||||
is to have it run on NanoX as well as desktop X11.
|
||||
You have downloaded the X11 port of the wxWidgets GUI library.
|
||||
This runs on X11 with no Motif, Xt, GTK+ or any other standard
|
||||
widget set -- instead it uses the wxUniversal widgets. The
|
||||
intention is to have it run on NanoX as well as desktop X11.
|
||||
|
||||
More information about the wxWidgets project as a whole
|
||||
can be found at:
|
||||
|
||||
@@ -1274,6 +1274,7 @@
|
||||
#define wxUSE_BOOKCTRL (wxUSE_NOTEBOOK || \
|
||||
wxUSE_LISTBOOK || \
|
||||
wxUSE_CHOICEBOOK || \
|
||||
wxUSE_TOOLBOOK || \
|
||||
wxUSE_TREEBOOK)
|
||||
|
||||
#if wxUSE_COLLPANE
|
||||
@@ -1309,6 +1310,17 @@
|
||||
# endif
|
||||
#endif /* wxUSE_CHOICEBOOK */
|
||||
|
||||
#if wxUSE_TOOLBOOK
|
||||
# if !wxUSE_TOOLBAR
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxToolbook requires wxToolBar"
|
||||
# else
|
||||
# undef wxUSE_TOOLBAR
|
||||
# define wxUSE_TOOLBAR 1
|
||||
# endif
|
||||
# endif
|
||||
#endif /* wxUSE_TOOLBOOK */
|
||||
|
||||
#if !wxUSE_ODCOMBOBOX
|
||||
# if wxUSE_BITMAPCOMBOBOX
|
||||
# error "wxBitmapComboBox requires wxOwnerDrawnComboBox"
|
||||
|
||||
@@ -56,7 +56,8 @@ enum
|
||||
wxCONFIG_USE_LOCAL_FILE = 1,
|
||||
wxCONFIG_USE_GLOBAL_FILE = 2,
|
||||
wxCONFIG_USE_RELATIVE_PATH = 4,
|
||||
wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8
|
||||
wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
|
||||
wxCONFIG_USE_SUBDIR = 16
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -639,6 +639,12 @@ public:
|
||||
// resets time to 00:00:00, doesn't change the date
|
||||
wxDateTime& ResetTime();
|
||||
|
||||
#if wxABI_VERSION >= 20802
|
||||
// get the date part of this object only, i.e. the object which has the
|
||||
// same date as this one but time of 00:00:00
|
||||
wxDateTime GetDateOnly() const;
|
||||
#endif // wxABI 2.8.1+
|
||||
|
||||
// the following functions don't change the values of the other
|
||||
// fields, i.e. SetMinute() won't change either hour or seconds value
|
||||
|
||||
|
||||
@@ -594,6 +594,12 @@ public:
|
||||
|
||||
const wxList& GetMenus() const { return m_fileMenus; }
|
||||
|
||||
#if wxABI_VERSION >= 20802
|
||||
// Set/get base id
|
||||
void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
|
||||
wxWindowID GetBaseId() const { return m_idBase; }
|
||||
#endif // wxABI 2.8.2+
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
// deprecated, use GetCount() instead
|
||||
wxDEPRECATED( size_t GetNoHistoryFiles() const );
|
||||
|
||||
@@ -60,6 +60,12 @@ public:
|
||||
virtual void ShowCancelButton( bool show );
|
||||
virtual bool IsCancelButtonVisible() const;
|
||||
|
||||
#if wxABI_VERSION >= 20802
|
||||
// TODO: In 2.9 these should probably be virtual, and declared in the base class...
|
||||
void SetDescriptiveText(const wxString& text);
|
||||
wxString GetDescriptiveText() const;
|
||||
#endif
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
|
||||
@@ -53,6 +53,12 @@ public:
|
||||
virtual void ShowCancelButton( bool show );
|
||||
virtual bool IsCancelButtonVisible() const;
|
||||
|
||||
#if wxABI_VERSION >= 20802
|
||||
// TODO: In 2.9 these should probably be virtual, and declared in the base class...
|
||||
void SetDescriptiveText(const wxString& text);
|
||||
wxString GetDescriptiveText() const;
|
||||
#endif
|
||||
|
||||
virtual wxInt32 MacSearchFieldSearchHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
||||
virtual wxInt32 MacSearchFieldCancelHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
||||
|
||||
|
||||
@@ -99,14 +99,22 @@ protected:
|
||||
// the handler for wxSpinButton events
|
||||
void OnSpinChange(wxSpinEvent& event);
|
||||
|
||||
// Handle processing of special keys
|
||||
// handle processing of special keys
|
||||
void OnChar(wxKeyEvent& event);
|
||||
void OnSetFocus(wxFocusEvent& event);
|
||||
void OnKillFocus(wxFocusEvent& event);
|
||||
|
||||
int m_oldValue;
|
||||
// generate spin control update event with the given value
|
||||
void SendSpinUpdate(int value);
|
||||
|
||||
// called to ensure that the value is in the correct range
|
||||
virtual void NormalizeValue();
|
||||
|
||||
|
||||
// the value of the control before the latest change (which might not have
|
||||
// changed anything in fact -- this is why we need this field)
|
||||
int m_oldValue;
|
||||
|
||||
// the data for the "buddy" text ctrl
|
||||
WXHWND m_hwndBuddy;
|
||||
WXFARPROC m_wndProcBuddy;
|
||||
|
||||
@@ -52,8 +52,6 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
|
||||
public: // public API
|
||||
|
||||
// margin between the text control and the picker
|
||||
@@ -107,12 +105,16 @@ public: // public API
|
||||
wxControl *GetPickerCtrl()
|
||||
{ return m_picker; }
|
||||
|
||||
public: // methods that derived class must/may override
|
||||
|
||||
// methods that derived class must/may override
|
||||
virtual void UpdatePickerFromTextCtrl() = 0;
|
||||
virtual void UpdateTextCtrlFromPicker() = 0;
|
||||
|
||||
protected: // utility functions
|
||||
protected:
|
||||
// overridden base class methods
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip(wxToolTip *tip);
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
|
||||
// event handlers
|
||||
void OnTextCtrlDelete(wxWindowDestroyEvent &);
|
||||
|
||||
@@ -153,6 +153,23 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 20802
|
||||
// setters for the others flags
|
||||
wxSizerFlags& Shaped()
|
||||
{
|
||||
m_flags |= wxSHAPED;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxSizerFlags& FixedMinSize()
|
||||
{
|
||||
m_flags |= wxFIXED_MINSIZE;
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif // wx 2.8.2+
|
||||
|
||||
// accessors for wxSizer only
|
||||
int GetProportion() const { return m_proportion; }
|
||||
int GetFlags() const { return m_flags; }
|
||||
|
||||
@@ -385,6 +385,11 @@ public:
|
||||
|
||||
void Clear();
|
||||
|
||||
#if wxABI_VERSION >= 20802
|
||||
// return true if the conversion could be initilized successfully
|
||||
bool IsOk() const;
|
||||
#endif // wx 2.8.2+
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "wx/longlong.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/stopwatch.h" // for backwards compatibility
|
||||
#include "wx/window.h" // only for NewControlId()
|
||||
|
||||
|
||||
// more readable flags for Start():
|
||||
@@ -51,8 +52,12 @@ public:
|
||||
|
||||
// same as ctor above
|
||||
void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY)
|
||||
{ m_owner = owner; m_idTimer = timerid == wxID_ANY ? wxNewId() : timerid; }
|
||||
wxEvtHandler * GetOwner() const { return m_owner; }
|
||||
{
|
||||
m_owner = owner;
|
||||
m_idTimer = timerid == wxID_ANY ? wxWindow::NewControlId() : timerid;
|
||||
}
|
||||
|
||||
wxEvtHandler *GetOwner() const { return m_owner; }
|
||||
|
||||
virtual ~wxTimerBase();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 8
|
||||
#define wxRELEASE_NUMBER 1
|
||||
#define wxSUBRELEASE_NUMBER 0
|
||||
#define wxSUBRELEASE_NUMBER 1
|
||||
#define wxVERSION_STRING _T("wxWidgets 2.8.1")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
|
||||
@@ -41,7 +41,9 @@ private:
|
||||
wxObject* Handle_spacer();
|
||||
wxObject* Handle_sizer();
|
||||
wxSizer* Handle_wxBoxSizer();
|
||||
#if wxUSE_STATBOX
|
||||
wxSizer* Handle_wxStaticBoxSizer();
|
||||
#endif
|
||||
wxSizer* Handle_wxGridSizer();
|
||||
wxSizer* Handle_wxFlexGridSizer();
|
||||
wxSizer* Handle_wxGridBagSizer();
|
||||
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
// resource. If an unknown str_id is requested (i.e. other than wxID_XXX
|
||||
// or integer), a new record is created which associates the given string
|
||||
// with a number. If value_if_not_found == wxID_NONE, the number is obtained via
|
||||
// wxNewId(). Otherwise value_if_not_found is used.
|
||||
// wxWindow::NewControlId(). Otherwise value_if_not_found is used.
|
||||
// Macro XRCID(name) is provided for convenient use in event tables.
|
||||
static int GetXRCID(const wxChar *str_id, int value_if_not_found = wxID_NONE);
|
||||
|
||||
|
||||
@@ -269,7 +269,8 @@ class SettingsPanel : public wxPanel
|
||||
public:
|
||||
|
||||
SettingsPanel(wxWindow* parent, MyFrame* frame)
|
||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
|
||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize),
|
||||
m_frame(frame)
|
||||
{
|
||||
//wxBoxSizer* vert = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
@@ -402,7 +403,6 @@ public:
|
||||
SetSizer(cont_sizer);
|
||||
GetSizer()->SetSizeHints(this);
|
||||
|
||||
m_frame = frame;
|
||||
m_border_size->SetValue(frame->GetDockArt()->GetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE));
|
||||
m_sash_size->SetValue(frame->GetDockArt()->GetMetric(wxAUI_DOCKART_SASH_SIZE));
|
||||
m_caption_size->SetValue(frame->GetDockArt()->GetMetric(wxAUI_DOCKART_CAPTION_SIZE));
|
||||
|
||||
@@ -84,7 +84,8 @@ protected:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
#if USE_LOG_WINDOW
|
||||
void OnClearLog(wxCommandEvent& event);
|
||||
#endif
|
||||
void OnClearLogUpdateUI(wxUpdateUIEvent& event);
|
||||
#endif // USE_LOG_WINDOW
|
||||
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
|
||||
@@ -200,7 +201,7 @@ enum
|
||||
{
|
||||
Menu_File_Quit = wxID_EXIT,
|
||||
#if USE_LOG_WINDOW
|
||||
Menu_File_ClearLog,
|
||||
Menu_File_ClearLog = 100,
|
||||
#endif
|
||||
|
||||
Menu_MenuBar_Toggle = 200,
|
||||
@@ -266,6 +267,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(Menu_File_Quit, MyFrame::OnQuit)
|
||||
#if USE_LOG_WINDOW
|
||||
EVT_MENU(Menu_File_ClearLog, MyFrame::OnClearLog)
|
||||
EVT_UPDATE_UI(Menu_File_ClearLog, MyFrame::OnClearLogUpdateUI)
|
||||
#endif
|
||||
|
||||
EVT_MENU(Menu_Help_About, MyFrame::OnAbout)
|
||||
@@ -629,11 +631,21 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
|
||||
#if USE_LOG_WINDOW
|
||||
|
||||
void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_textctrl->Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
void MyFrame::OnClearLogUpdateUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
// if we only enable this item when the log window is empty, we never see
|
||||
// it in the disable state as a message is logged whenever the menu is
|
||||
// opened, so we disable it if there is not "much" text in the window
|
||||
event.Enable( m_textctrl->GetNumberOfLines() > 5 );
|
||||
}
|
||||
|
||||
#endif // USE_LOG_WINDOW
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
|
||||
@@ -307,8 +307,15 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
|
||||
}
|
||||
}
|
||||
|
||||
if ( bookctrl && bookctrl->GetEventHandler()->ProcessEvent(event) )
|
||||
return;
|
||||
if ( bookctrl )
|
||||
{
|
||||
// make sure that we don't bubble up the event again from the book
|
||||
// control resulting in infinite recursion
|
||||
wxNavigationKeyEvent eventCopy(event);
|
||||
eventCopy.SetEventObject(m_winParent);
|
||||
if ( bookctrl->GetEventHandler()->ProcessEvent(eventCopy) )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// there is not much to do if we don't have children and we're not
|
||||
|
||||
@@ -1496,6 +1496,16 @@ wxDateTime& wxDateTime::ResetTime()
|
||||
return *this;
|
||||
}
|
||||
|
||||
wxDateTime wxDateTime::GetDateOnly() const
|
||||
{
|
||||
Tm tm = GetTm();
|
||||
tm.msec =
|
||||
tm.sec =
|
||||
tm.min =
|
||||
tm.hour = 0;
|
||||
return wxDateTime(tm);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// DOS Date and Time Format functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -435,7 +435,13 @@ wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
|
||||
{
|
||||
// Make up names for files if empty
|
||||
if ( m_strLocalFile.empty() && (style & wxCONFIG_USE_LOCAL_FILE) )
|
||||
{
|
||||
m_strLocalFile = GetLocalFileName(GetAppName());
|
||||
#if defined(__UNIX__) && !defined(__VMS)
|
||||
if ( style & wxCONFIG_USE_SUBDIR )
|
||||
m_strLocalFile << wxFILE_SEP_PATH << GetAppName();
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( m_strGlobalFile.empty() && (style & wxCONFIG_USE_GLOBAL_FILE) )
|
||||
m_strGlobalFile = GetGlobalFileName(GetAppName());
|
||||
|
||||
@@ -1719,7 +1719,7 @@ bool wxLocale::Init(int language, int flags)
|
||||
{
|
||||
retloc = wxSetlocaleTryUTF(LC_ALL, localeAlt);
|
||||
if ( !retloc )
|
||||
retloc = wxSetlocaleTryUTF(LC_ALL, locale.Left(2));
|
||||
retloc = wxSetlocaleTryUTF(LC_ALL, localeAlt.Left(2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,9 @@ void wxPickerBase::PostCreation()
|
||||
SetMinSize( m_sizer->GetMinSize() );
|
||||
}
|
||||
|
||||
void wxPickerBase::DoSetToolTip( wxToolTip *tip )
|
||||
#if wxUSE_TOOLTIPS
|
||||
|
||||
void wxPickerBase::DoSetToolTip(wxToolTip *tip)
|
||||
{
|
||||
// don't set the tooltip on us but rather on our two child windows
|
||||
// as otherwise it would appear only when the cursor is placed on the
|
||||
@@ -132,10 +134,11 @@ void wxPickerBase::DoSetToolTip( wxToolTip *tip )
|
||||
m_picker->SetToolTip(tip);
|
||||
|
||||
// do a copy as wxWindow will own the pointer we pass
|
||||
m_text->SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL);
|
||||
if ( m_text )
|
||||
m_text->SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL);
|
||||
}
|
||||
|
||||
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPickerBase - event handlers
|
||||
|
||||
@@ -3518,6 +3518,19 @@ void wxCSConv::CreateConvIfNeeded() const
|
||||
}
|
||||
}
|
||||
|
||||
bool wxCSConv::IsOk() const
|
||||
{
|
||||
CreateConvIfNeeded();
|
||||
|
||||
// special case: no convReal created for wxFONTENCODING_ISO8859_1
|
||||
if ( m_encoding == wxFONTENCODING_ISO8859_1 )
|
||||
return true; // always ok as we do it ourselves
|
||||
|
||||
// m_convReal->IsOk() is called at its own creation, so we know it must
|
||||
// be ok if m_convReal is non-NULL
|
||||
return m_convReal != NULL;
|
||||
}
|
||||
|
||||
size_t wxCSConv::ToWChar(wchar_t *dst, size_t dstLen,
|
||||
const char *src, size_t srcLen) const
|
||||
{
|
||||
|
||||
@@ -88,8 +88,8 @@ bool wxTextFile::OnClose()
|
||||
|
||||
bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||
{
|
||||
// file should be opened and we must be in it's beginning
|
||||
wxASSERT( m_file.IsOpened() && m_file.Tell() == 0 );
|
||||
// file should be opened
|
||||
wxASSERT_MSG( m_file.IsOpened(), _T("can't read closed file") );
|
||||
|
||||
// read the entire file in memory: this is not the most efficient thing to
|
||||
// do but there is no good way to avoid it in Unicode build because if we
|
||||
@@ -98,14 +98,35 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||
// read and so the conversion would fail) and, as the file contents is kept
|
||||
// in memory by wxTextFile anyhow, it shouldn't be a big problem to read
|
||||
// the file entirely
|
||||
const size_t bufSize = (size_t)(m_file.Length() + 4 /* for trailing NULs */ );
|
||||
size_t bufPos = 0;
|
||||
wxCharBuffer buf(bufSize - 1 /* it adds 1 internally */);
|
||||
|
||||
size_t bufSize = 0,
|
||||
bufPos = 0;
|
||||
char block[1024];
|
||||
for ( bool eof = false; !eof; )
|
||||
wxCharBuffer buf;
|
||||
|
||||
// first determine if the file is seekable or not and so whether we can
|
||||
// determine its length in advance
|
||||
wxFileOffset fileLength;
|
||||
{
|
||||
wxLogNull logNull;
|
||||
fileLength = m_file.Length();
|
||||
}
|
||||
|
||||
// some non-seekable files under /proc under Linux pretend that they're
|
||||
// seekable but always return 0; others do return an error
|
||||
const bool seekable = fileLength != wxInvalidOffset && fileLength != 0;
|
||||
if ( seekable )
|
||||
{
|
||||
// we know the required length, so set the buffer size in advance
|
||||
bufSize = fileLength;
|
||||
if ( !buf.extend(bufSize - 1 /* it adds 1 internally */) )
|
||||
return false;
|
||||
|
||||
// if the file is seekable, also check that we're at its beginning
|
||||
wxASSERT_MSG( m_file.Tell() == 0, _T("should be at start of file") );
|
||||
}
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
// try to read up to the size of the entire block
|
||||
ssize_t nRead = m_file.Read(block, WXSIZEOF(block));
|
||||
|
||||
if ( nRead == wxInvalidOffset )
|
||||
@@ -115,20 +136,41 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||
}
|
||||
|
||||
if ( nRead == 0 )
|
||||
break;
|
||||
{
|
||||
// if no bytes have been read, presumably this is a valid-but-empty file
|
||||
if ( bufPos == 0 )
|
||||
return true;
|
||||
|
||||
// this shouldn't happen but don't overwrite the buffer if it does
|
||||
wxCHECK_MSG( bufPos + nRead <= bufSize, false,
|
||||
_T("read more than file length?") );
|
||||
// otherwise we've finished reading the file
|
||||
break;
|
||||
}
|
||||
|
||||
if ( seekable )
|
||||
{
|
||||
// this shouldn't happen but don't overwrite the buffer if it does
|
||||
wxCHECK_MSG( bufPos + nRead <= bufSize, false,
|
||||
_T("read more than file length?") );
|
||||
}
|
||||
else // !seekable
|
||||
{
|
||||
// for non-seekable files we have to allocate more memory on the go
|
||||
if ( !buf.extend(bufPos + nRead - 1 /* it adds 1 internally */) )
|
||||
return false;
|
||||
}
|
||||
|
||||
// append to the buffer
|
||||
memcpy(buf.data() + bufPos, block, nRead);
|
||||
bufPos += nRead;
|
||||
}
|
||||
|
||||
if ( !seekable )
|
||||
{
|
||||
bufSize = bufPos;
|
||||
}
|
||||
|
||||
const wxString str(buf, conv, bufPos);
|
||||
|
||||
// this doesn't risk to happen in ANSI build
|
||||
// there's no risk of this happening in ANSI build
|
||||
#if wxUSE_UNICODE
|
||||
if ( bufSize > 4 && str.empty() )
|
||||
{
|
||||
|
||||
@@ -54,10 +54,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxChoicebookEvent, wxNotifyEvent)
|
||||
const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING = wxNewEventType();
|
||||
const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED = wxNewEventType();
|
||||
#endif
|
||||
const int wxID_CHOICEBOOKCHOICE = wxNewId();
|
||||
|
||||
BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
|
||||
EVT_CHOICE(wxID_CHOICEBOOKCHOICE, wxChoicebook::OnChoiceSelected)
|
||||
EVT_CHOICE(wxID_ANY, wxChoicebook::OnChoiceSelected)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -98,7 +97,7 @@ wxChoicebook::Create(wxWindow *parent,
|
||||
m_bookctrl = new wxChoice
|
||||
(
|
||||
this,
|
||||
wxID_CHOICEBOOKCHOICE,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize
|
||||
);
|
||||
@@ -302,6 +301,12 @@ bool wxChoicebook::DeleteAllPages()
|
||||
|
||||
void wxChoicebook::OnChoiceSelected(wxCommandEvent& eventChoice)
|
||||
{
|
||||
if ( eventChoice.GetEventObject() != m_bookctrl )
|
||||
{
|
||||
eventChoice.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
const int selNew = eventChoice.GetSelection();
|
||||
|
||||
if ( selNew == m_selection )
|
||||
|
||||
@@ -627,7 +627,11 @@ void wxGridCellTextEditor::Create(wxWindow* parent,
|
||||
m_control = new wxTextCtrl(parent, id, wxEmptyString,
|
||||
wxDefaultPosition, wxDefaultSize
|
||||
#if defined(__WXMSW__)
|
||||
, wxTE_PROCESS_TAB | wxTE_AUTO_SCROLL | wxNO_BORDER
|
||||
,
|
||||
wxTE_PROCESS_ENTER |
|
||||
wxTE_PROCESS_TAB |
|
||||
wxTE_AUTO_SCROLL |
|
||||
wxNO_BORDER
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
@@ -54,11 +54,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxListbookEvent, wxNotifyEvent)
|
||||
const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING = wxNewEventType();
|
||||
const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = wxNewEventType();
|
||||
#endif
|
||||
const int wxID_LISTBOOKLISTVIEW = wxNewId();
|
||||
|
||||
BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase)
|
||||
EVT_SIZE(wxListbook::OnSize)
|
||||
EVT_LIST_ITEM_SELECTED(wxID_LISTBOOKLISTVIEW, wxListbook::OnListSelected)
|
||||
EVT_LIST_ITEM_SELECTED(wxID_ANY, wxListbook::OnListSelected)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -103,7 +102,7 @@ wxListbook::Create(wxWindow *parent,
|
||||
m_bookctrl = new wxListView
|
||||
(
|
||||
this,
|
||||
wxID_LISTBOOKLISTVIEW,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxLC_ICON | wxLC_SINGLE_SEL |
|
||||
@@ -392,6 +391,12 @@ bool wxListbook::DeleteAllPages()
|
||||
|
||||
void wxListbook::OnListSelected(wxListEvent& eventList)
|
||||
{
|
||||
if ( eventList.GetEventObject() != m_bookctrl )
|
||||
{
|
||||
eventList.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
const int selNew = eventList.GetIndex();
|
||||
|
||||
if ( selNew == m_selection )
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
|
||||
|
||||
#include "wx/generic/prntdlgg.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dc.h"
|
||||
@@ -46,8 +48,6 @@
|
||||
#include "wx/statline.h"
|
||||
#endif
|
||||
|
||||
#include "wx/generic/prntdlgg.h"
|
||||
|
||||
#if wxUSE_POSTSCRIPT
|
||||
#include "wx/generic/dcpsg.h"
|
||||
#endif
|
||||
@@ -63,8 +63,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#if wxUSE_LIBGNOMEPRINT
|
||||
#include "wx/html/forcelnk.h"
|
||||
FORCE_LINK(gnome_print)
|
||||
#include "wx/link.h"
|
||||
wxFORCE_LINK_MODULE(gnome_print)
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -50,6 +50,57 @@ static const wxCoord ICON_MARGIN = 0;
|
||||
static const wxCoord ICON_OFFSET = 0;
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// TODO: These functions or something like them should probably be made
|
||||
// public. There are similar functions in src/aui/dockart.cpp...
|
||||
|
||||
static double wxBlendColour(double fg, double bg, double alpha)
|
||||
{
|
||||
double result = bg + (alpha * (fg - bg));
|
||||
if (result < 0.0)
|
||||
result = 0.0;
|
||||
if (result > 255)
|
||||
result = 255;
|
||||
return result;
|
||||
}
|
||||
|
||||
static wxColor wxStepColour(const wxColor& c, int ialpha)
|
||||
{
|
||||
if (ialpha == 100)
|
||||
return c;
|
||||
|
||||
double r = c.Red(), g = c.Green(), b = c.Blue();
|
||||
double bg;
|
||||
|
||||
// ialpha is 0..200 where 0 is completely black
|
||||
// and 200 is completely white and 100 is the same
|
||||
// convert that to normal alpha 0.0 - 1.0
|
||||
ialpha = wxMin(ialpha, 200);
|
||||
ialpha = wxMax(ialpha, 0);
|
||||
double alpha = ((double)(ialpha - 100.0))/100.0;
|
||||
|
||||
if (ialpha > 100)
|
||||
{
|
||||
// blend with white
|
||||
bg = 255.0;
|
||||
alpha = 1.0 - alpha; // 0 = transparent fg; 1 = opaque fg
|
||||
}
|
||||
else
|
||||
{
|
||||
// blend with black
|
||||
bg = 0.0;
|
||||
alpha = 1.0 + alpha; // 0 = transparent fg; 1 = opaque fg
|
||||
}
|
||||
|
||||
r = wxBlendColour(r, bg, alpha);
|
||||
g = wxBlendColour(g, bg, alpha);
|
||||
b = wxBlendColour(b, bg, alpha);
|
||||
|
||||
return wxColour((unsigned char)r, (unsigned char)g, (unsigned char)b);
|
||||
}
|
||||
|
||||
#define LIGHT_STEP 160
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSearchTextCtrl: text control used by search control
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -62,11 +113,27 @@ public:
|
||||
style | wxNO_BORDER)
|
||||
{
|
||||
m_search = search;
|
||||
m_defaultFG = GetForegroundColour();
|
||||
|
||||
// remove the default minsize, the searchctrl will have one instead
|
||||
SetSizeHints(wxDefaultCoord,wxDefaultCoord);
|
||||
}
|
||||
|
||||
void SetDescriptiveText(const wxString& text)
|
||||
{
|
||||
if ( GetValue() == m_descriptiveText )
|
||||
{
|
||||
SetValue(wxEmptyString);
|
||||
}
|
||||
|
||||
m_descriptiveText = text;
|
||||
}
|
||||
|
||||
wxString GetDescriptiveText() const
|
||||
{
|
||||
return m_descriptiveText;
|
||||
}
|
||||
|
||||
protected:
|
||||
void OnText(wxCommandEvent& eventText)
|
||||
{
|
||||
@@ -92,8 +159,30 @@ protected:
|
||||
m_search->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
void OnIdle(wxIdleEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( IsEmpty() && !(wxWindow::FindFocus() == this) )
|
||||
{
|
||||
SetValue(m_descriptiveText);
|
||||
SetInsertionPoint(0);
|
||||
SetForegroundColour(wxStepColour(m_defaultFG, LIGHT_STEP));
|
||||
}
|
||||
}
|
||||
|
||||
void OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
if ( GetValue() == m_descriptiveText )
|
||||
{
|
||||
SetValue(wxEmptyString);
|
||||
SetForegroundColour(m_defaultFG);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
wxSearchCtrl* m_search;
|
||||
wxString m_descriptiveText;
|
||||
wxColour m_defaultFG;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@@ -103,6 +192,8 @@ BEGIN_EVENT_TABLE(wxSearchTextCtrl, wxTextCtrl)
|
||||
EVT_TEXT_ENTER(wxID_ANY, wxSearchTextCtrl::OnText)
|
||||
EVT_TEXT_URL(wxID_ANY, wxSearchTextCtrl::OnTextUrl)
|
||||
EVT_TEXT_MAXLEN(wxID_ANY, wxSearchTextCtrl::OnText)
|
||||
EVT_IDLE(wxSearchTextCtrl::OnIdle)
|
||||
EVT_SET_FOCUS(wxSearchTextCtrl::OnFocus)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -234,6 +325,7 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
}
|
||||
|
||||
m_text = new wxSearchTextCtrl(this, value, style & ~wxBORDER_MASK);
|
||||
m_text->SetDescriptiveText(_("Search"));
|
||||
|
||||
wxSize sizeText = m_text->GetBestSize();
|
||||
|
||||
@@ -280,12 +372,6 @@ void wxSearchCtrl::SetMenu( wxMenu* menu )
|
||||
{
|
||||
m_searchButton->SetBitmapLabel(m_searchMenuBitmap);
|
||||
m_searchButton->Refresh();
|
||||
if ( !m_searchButtonVisible )
|
||||
{
|
||||
// adding the menu will force the search button to be visible
|
||||
wxRect rect = GetRect();
|
||||
LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight());
|
||||
}
|
||||
}
|
||||
else if ( !m_menu && hadMenu )
|
||||
{
|
||||
@@ -294,12 +380,9 @@ void wxSearchCtrl::SetMenu( wxMenu* menu )
|
||||
{
|
||||
m_searchButton->Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxRect rect = GetRect();
|
||||
LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight());
|
||||
}
|
||||
}
|
||||
wxRect rect = GetRect();
|
||||
LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight());
|
||||
}
|
||||
|
||||
wxMenu* wxSearchCtrl::GetMenu()
|
||||
@@ -348,6 +431,15 @@ bool wxSearchCtrl::IsCancelButtonVisible() const
|
||||
return m_cancelButtonVisible;
|
||||
}
|
||||
|
||||
void wxSearchCtrl::SetDescriptiveText(const wxString& text)
|
||||
{
|
||||
m_text->SetDescriptiveText(text);
|
||||
}
|
||||
|
||||
wxString wxSearchCtrl::GetDescriptiveText() const
|
||||
{
|
||||
return m_text->GetDescriptiveText();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// geometry
|
||||
@@ -393,7 +485,7 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
||||
|
||||
wxSize sizeText = m_text->GetBestSize();
|
||||
// make room for the search menu & clear button
|
||||
int horizontalBorder = 1 + ( sizeText.y - sizeText.y * 14 / 21 ) / 2;
|
||||
int horizontalBorder = ( sizeText.y - sizeText.y * 14 / 21 ) / 2;
|
||||
x += horizontalBorder;
|
||||
y += BORDER;
|
||||
width -= horizontalBorder*2;
|
||||
@@ -427,13 +519,13 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
||||
|
||||
// position the subcontrols inside the client area
|
||||
|
||||
m_searchButton->SetSize(x, y + ICON_OFFSET, sizeSearch.x, height);
|
||||
m_searchButton->SetSize(x, y + ICON_OFFSET - 1, sizeSearch.x, height);
|
||||
m_text->SetSize( x + sizeSearch.x + searchMargin,
|
||||
y + ICON_OFFSET - BORDER,
|
||||
textWidth,
|
||||
height);
|
||||
m_cancelButton->SetSize(x + sizeSearch.x + searchMargin + textWidth + cancelMargin,
|
||||
y + ICON_OFFSET, sizeCancel.x, height);
|
||||
y + ICON_OFFSET - 1, sizeCancel.x, height);
|
||||
}
|
||||
|
||||
|
||||
@@ -442,7 +534,11 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
||||
|
||||
wxString wxSearchCtrl::GetValue() const
|
||||
{
|
||||
return m_text->GetValue();
|
||||
wxString value = m_text->GetValue();
|
||||
if (value == m_text->GetDescriptiveText())
|
||||
return wxEmptyString;
|
||||
else
|
||||
return value;
|
||||
}
|
||||
void wxSearchCtrl::SetValue(const wxString& value)
|
||||
{
|
||||
@@ -811,7 +907,7 @@ static int GetMultiplier()
|
||||
wxBitmap wxSearchCtrl::RenderSearchBitmap( int x, int y, bool renderDrop )
|
||||
{
|
||||
wxColour bg = GetBackgroundColour();
|
||||
wxColour fg = GetForegroundColour();
|
||||
wxColour fg = wxStepColour(GetForegroundColour(), LIGHT_STEP-20);
|
||||
|
||||
//===============================================================================
|
||||
// begin drawing code
|
||||
@@ -892,6 +988,7 @@ wxBitmap wxSearchCtrl::RenderSearchBitmap( int x, int y, bool renderDrop )
|
||||
};
|
||||
mem.DrawPolygon(WXSIZEOF(dropPolygon),dropPolygon,multiplier*triangleX,multiplier*triangleY);
|
||||
}
|
||||
mem.SelectObject(wxNullBitmap);
|
||||
|
||||
//===============================================================================
|
||||
// end drawing code
|
||||
@@ -903,6 +1000,11 @@ wxBitmap wxSearchCtrl::RenderSearchBitmap( int x, int y, bool renderDrop )
|
||||
image.Rescale(x,y);
|
||||
bitmap = wxBitmap( image );
|
||||
}
|
||||
if ( !renderDrop )
|
||||
{
|
||||
// Trim the edge where the arrow would have gone
|
||||
bitmap = bitmap.GetSubBitmap(wxRect(0,0, y,y));
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
@@ -910,7 +1012,7 @@ wxBitmap wxSearchCtrl::RenderSearchBitmap( int x, int y, bool renderDrop )
|
||||
wxBitmap wxSearchCtrl::RenderCancelBitmap( int x, int y )
|
||||
{
|
||||
wxColour bg = GetBackgroundColour();
|
||||
wxColour fg = GetForegroundColour();
|
||||
wxColour fg = wxStepColour(GetForegroundColour(), LIGHT_STEP);
|
||||
|
||||
//===============================================================================
|
||||
// begin drawing code
|
||||
|
||||
@@ -50,7 +50,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolbookEvent, wxNotifyEvent)
|
||||
const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING = wxNewEventType();
|
||||
const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED = wxNewEventType();
|
||||
#endif
|
||||
const int wxID_TOOLBOOKTOOLBAR = wxNewId();
|
||||
|
||||
BEGIN_EVENT_TABLE(wxToolbook, wxBookCtrlBase)
|
||||
EVT_SIZE(wxToolbook::OnSize)
|
||||
@@ -102,7 +101,7 @@ bool wxToolbook::Create(wxWindow *parent,
|
||||
m_bookctrl = new wxButtonToolBar
|
||||
(
|
||||
this,
|
||||
wxID_TOOLBOOKTOOLBAR,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
orient|wxTB_TEXT|wxTB_FLAT|wxNO_BORDER
|
||||
@@ -114,7 +113,7 @@ bool wxToolbook::Create(wxWindow *parent,
|
||||
m_bookctrl = new wxToolBar
|
||||
(
|
||||
this,
|
||||
wxID_TOOLBOOKTOOLBAR,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
orient|wxTB_TEXT|wxTB_FLAT|wxTB_NODIVIDER|wxNO_BORDER
|
||||
|
||||
@@ -54,12 +54,11 @@ const wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED = wxNewEventType();
|
||||
const wxEventType wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED = wxNewEventType();
|
||||
const wxEventType wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED = wxNewEventType();
|
||||
#endif
|
||||
const int wxID_TREEBOOKTREEVIEW = wxNewId();
|
||||
|
||||
BEGIN_EVENT_TABLE(wxTreebook, wxBookCtrlBase)
|
||||
EVT_TREE_SEL_CHANGED (wxID_TREEBOOKTREEVIEW, wxTreebook::OnTreeSelectionChange)
|
||||
EVT_TREE_ITEM_EXPANDED (wxID_TREEBOOKTREEVIEW, wxTreebook::OnTreeNodeExpandedCollapsed)
|
||||
EVT_TREE_ITEM_COLLAPSED(wxID_TREEBOOKTREEVIEW, wxTreebook::OnTreeNodeExpandedCollapsed)
|
||||
EVT_TREE_SEL_CHANGED (wxID_ANY, wxTreebook::OnTreeSelectionChange)
|
||||
EVT_TREE_ITEM_EXPANDED (wxID_ANY, wxTreebook::OnTreeNodeExpandedCollapsed)
|
||||
EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxTreebook::OnTreeNodeExpandedCollapsed)
|
||||
|
||||
WX_EVENT_TABLE_CONTROL_CONTAINER(wxTreebook)
|
||||
END_EVENT_TABLE()
|
||||
@@ -108,7 +107,7 @@ wxTreebook::Create(wxWindow *parent,
|
||||
m_bookctrl = new wxTreeCtrl
|
||||
(
|
||||
this,
|
||||
wxID_TREEBOOKTREEVIEW,
|
||||
wxID_ANY,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
#ifndef __WXMSW__
|
||||
@@ -691,6 +690,12 @@ void wxTreebook::AssignImageList(wxImageList *imageList)
|
||||
|
||||
void wxTreebook::OnTreeSelectionChange(wxTreeEvent& event)
|
||||
{
|
||||
if ( event.GetEventObject() != m_bookctrl )
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
wxTreeItemId newId = event.GetItem();
|
||||
|
||||
if ( (m_selection == wxNOT_FOUND &&
|
||||
@@ -710,6 +715,12 @@ void wxTreebook::OnTreeSelectionChange(wxTreeEvent& event)
|
||||
|
||||
void wxTreebook::OnTreeNodeExpandedCollapsed(wxTreeEvent & event)
|
||||
{
|
||||
if ( event.GetEventObject() != m_bookctrl )
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
wxTreeItemId nodeId = event.GetItem();
|
||||
if ( !nodeId.IsOk() || nodeId == GetTreeCtrl()->GetRootItem() )
|
||||
return;
|
||||
|
||||
126
src/gtk/app.cpp
126
src/gtk/app.cpp
@@ -26,50 +26,12 @@
|
||||
#include "wx/font.h"
|
||||
#endif
|
||||
|
||||
#include "wx/file.h"
|
||||
#include "wx/filename.h"
|
||||
#include "wx/thread.h"
|
||||
|
||||
#ifdef __WXGPE__
|
||||
#include <gpe/init.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
#include "wx/univ/theme.h"
|
||||
#include "wx/univ/renderer.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_POLL
|
||||
#if defined(__VMS)
|
||||
#include <poll.h>
|
||||
#else
|
||||
// bug in the OpenBSD headers: at least in 3.1 there is no extern "C"
|
||||
// in neither poll.h nor sys/poll.h which results in link errors later
|
||||
#ifdef __OPENBSD__
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <sys/poll.h>
|
||||
|
||||
#ifdef __OPENBSD__
|
||||
};
|
||||
#endif
|
||||
#endif // platform
|
||||
#else // !HAVE_POLL
|
||||
// we implement poll() ourselves using select() which is supposed exist in
|
||||
// all modern Unices
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#endif // HAVE_POLL/!HAVE_POLL
|
||||
|
||||
#include "wx/unix/private.h"
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
#include "wx/gtk/private.h"
|
||||
|
||||
@@ -79,9 +41,9 @@
|
||||
// link GnomeVFS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LIBGNOMEVFS
|
||||
#include "wx/html/forcelnk.h"
|
||||
FORCE_LINK(gnome_vfs)
|
||||
#if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS
|
||||
#include "wx/link.h"
|
||||
wxFORCE_LINK_MODULE(gnome_vfs)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -276,75 +238,13 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
||||
// Return FALSE if no more idle events are to be sent
|
||||
return moreIdles;
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
#if wxUSE_THREADS
|
||||
|
||||
#ifdef HAVE_POLL
|
||||
#define wxPoll poll
|
||||
#define wxPollFd pollfd
|
||||
#else // !HAVE_POLL
|
||||
|
||||
typedef GPollFD wxPollFd;
|
||||
|
||||
int wxPoll(wxPollFd *ufds, unsigned int nfds, int timeout)
|
||||
{
|
||||
// convert timeout from ms to struct timeval (s/us)
|
||||
timeval tv_timeout;
|
||||
tv_timeout.tv_sec = timeout/1000;
|
||||
tv_timeout.tv_usec = (timeout%1000)*1000;
|
||||
|
||||
// remember the highest fd used here
|
||||
int fdMax = -1;
|
||||
|
||||
// and fill the sets for select()
|
||||
fd_set readfds;
|
||||
fd_set writefds;
|
||||
fd_set exceptfds;
|
||||
wxFD_ZERO(&readfds);
|
||||
wxFD_ZERO(&writefds);
|
||||
wxFD_ZERO(&exceptfds);
|
||||
|
||||
unsigned int i;
|
||||
for ( i = 0; i < nfds; i++ )
|
||||
{
|
||||
wxASSERT_MSG( ufds[i].fd < FD_SETSIZE, _T("fd out of range") );
|
||||
|
||||
if ( ufds[i].events & G_IO_IN )
|
||||
wxFD_SET(ufds[i].fd, &readfds);
|
||||
|
||||
if ( ufds[i].events & G_IO_PRI )
|
||||
wxFD_SET(ufds[i].fd, &exceptfds);
|
||||
|
||||
if ( ufds[i].events & G_IO_OUT )
|
||||
wxFD_SET(ufds[i].fd, &writefds);
|
||||
|
||||
if ( ufds[i].fd > fdMax )
|
||||
fdMax = ufds[i].fd;
|
||||
}
|
||||
|
||||
fdMax++;
|
||||
int res = select(fdMax, &readfds, &writefds, &exceptfds, &tv_timeout);
|
||||
|
||||
// translate the results back
|
||||
for ( i = 0; i < nfds; i++ )
|
||||
{
|
||||
ufds[i].revents = 0;
|
||||
|
||||
if ( wxFD_ISSET(ufds[i].fd, &readfds ) )
|
||||
ufds[i].revents |= G_IO_IN;
|
||||
|
||||
if ( wxFD_ISSET(ufds[i].fd, &exceptfds ) )
|
||||
ufds[i].revents |= G_IO_PRI;
|
||||
|
||||
if ( wxFD_ISSET(ufds[i].fd, &writefds ) )
|
||||
ufds[i].revents |= G_IO_OUT;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif // HAVE_POLL/!HAVE_POLL
|
||||
static GPollFunc wxgs_poll_func;
|
||||
|
||||
extern "C" {
|
||||
static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
|
||||
{
|
||||
gdk_threads_enter();
|
||||
@@ -352,9 +252,7 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
|
||||
wxMutexGuiLeave();
|
||||
g_mainThreadLocked = true;
|
||||
|
||||
// we rely on the fact that glib GPollFD struct is really just pollfd but
|
||||
// I wonder how wise is this in the long term (VZ)
|
||||
gint res = wxPoll( (wxPollFd *) ufds, nfds, timeout );
|
||||
gint res = (*wxgs_poll_func)(ufds, nfds, timeout);
|
||||
|
||||
wxMutexGuiEnter();
|
||||
g_mainThreadLocked = false;
|
||||
@@ -363,11 +261,10 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
} // extern "C"
|
||||
|
||||
void wxapp_install_idle_handler()
|
||||
{
|
||||
if (wxTheApp == NULL)
|
||||
@@ -433,10 +330,6 @@ wxApp::wxApp()
|
||||
g_isIdle = true;
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
#if wxUSE_THREADS
|
||||
g_main_context_set_poll_func( NULL, wxapp_poll_func );
|
||||
#endif
|
||||
|
||||
// this is NULL for a "regular" wxApp, but is set (and freed) by a wxGLApp
|
||||
m_glVisualInfo = (void *) NULL;
|
||||
m_glFBCInfo = (void *) NULL;
|
||||
@@ -515,6 +408,9 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
||||
#if wxUSE_THREADS
|
||||
if (!g_thread_supported())
|
||||
g_thread_init(NULL);
|
||||
|
||||
wxgs_poll_func = g_main_context_get_poll_func(NULL);
|
||||
g_main_context_set_poll_func(NULL, wxapp_poll_func);
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
gtk_set_locale();
|
||||
|
||||
@@ -630,8 +630,25 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
/* this is a true error as we checked for the presence of such data before */
|
||||
wxCHECK_MSG( m_formatSupported, false, wxT("error retrieving data from clipboard") );
|
||||
/*
|
||||
Normally this is a true error as we checked for the presence of such
|
||||
data before, but there are applications that may return an empty
|
||||
string (e.g. Gnumeric-1.6.1 on Linux if an empty cell is copied)
|
||||
which would produce a false error message here, so we check for the
|
||||
size of the string first. In ansi, GetDataSize returns an extra
|
||||
value (for the closing null?), with unicode, the exact number of
|
||||
tokens is given (that is more than 1 for special characters)
|
||||
(tested with Gnumeric-1.6.1 and OpenOffice.org-2.0.2)
|
||||
*/
|
||||
#if wxUSE_UNICODE
|
||||
if ( format != wxDF_UNICODETEXT || data.GetDataSize(format) > 0 )
|
||||
#else // !UNICODE
|
||||
if ( format != wxDF_TEXT || data.GetDataSize(format) > 1 )
|
||||
#endif // UNICODE / !UNICODE
|
||||
{
|
||||
wxCHECK_MSG( m_formatSupported, false,
|
||||
wxT("error retrieving data from clipboard") );
|
||||
}
|
||||
|
||||
/* return success */
|
||||
delete[] array;
|
||||
|
||||
@@ -230,6 +230,8 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
fn.Assign(defaultFileName);
|
||||
else if ( !defaultFileName.empty() )
|
||||
fn.Assign(defaultDir, defaultFileName);
|
||||
else
|
||||
fn.AssignDir(defaultDir);
|
||||
|
||||
// set the initial file name and/or directory
|
||||
wxString fname = fn.GetFullName();
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/gtk/gnome/gprint.h"
|
||||
|
||||
#if wxUSE_LIBGNOMEPRINT
|
||||
|
||||
#include "wx/gtk/gnome/gprint.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/log.h"
|
||||
#include "wx/dcmemory.h"
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
static const double RAD2DEG = 180.0 / M_PI;
|
||||
|
||||
#include "wx/html/forcelnk.h"
|
||||
FORCE_LINK_ME(gnome_print)
|
||||
#include "wx/link.h"
|
||||
wxFORCE_LINK_THIS_MODULE(gnome_print)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomePrintLibrary
|
||||
@@ -717,7 +717,8 @@ bool wxGnomePrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt )
|
||||
{
|
||||
gs_lgp->gnome_print_job_close( job );
|
||||
g_object_unref (job);
|
||||
sm_lastError = wxPRINTER_ERROR;
|
||||
if (sm_lastError != wxPRINTER_CANCELLED)
|
||||
sm_lastError = wxPRINTER_ERROR;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,23 +15,22 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/gtk/gnome/gvfs.h"
|
||||
|
||||
#if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS
|
||||
|
||||
#include "wx/gtk/gnome/gvfs.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/log.h"
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
||||
#include "wx/mimetype.h"
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/dynlib.h"
|
||||
|
||||
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
|
||||
|
||||
#include "wx/html/forcelnk.h"
|
||||
FORCE_LINK_ME(gnome_vfs)
|
||||
#include "wx/link.h"
|
||||
wxFORCE_LINK_THIS_MODULE(gnome_vfs)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomeVFSLibrary
|
||||
|
||||
@@ -619,8 +619,25 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
|
||||
while (m_waiting) gtk_main_iteration();
|
||||
|
||||
/* this is a true error as we checked for the presence of such data before */
|
||||
wxCHECK_MSG( m_formatSupported, false, wxT("error retrieving data from clipboard") );
|
||||
/*
|
||||
Normally this is a true error as we checked for the presence of such
|
||||
data before, but there are applications that may return an empty
|
||||
string (e.g. Gnumeric-1.6.1 on Linux if an empty cell is copied)
|
||||
which would produce a false error message here, so we check for the
|
||||
size of the string first. In ansi, GetDataSize returns an extra
|
||||
value (for the closing null?), with unicode, the exact number of
|
||||
tokens is given (that is more than 1 for special characters)
|
||||
(tested with Gnumeric-1.6.1 and OpenOffice.org-2.0.2)
|
||||
*/
|
||||
#if wxUSE_UNICODE
|
||||
if ( format != wxDF_UNICODETEXT || data.GetDataSize(format) > 0 )
|
||||
#else // !UNICODE
|
||||
if ( format != wxDF_TEXT || data.GetDataSize(format) > 1 )
|
||||
#endif // UNICODE / !UNICODE
|
||||
{
|
||||
wxCHECK_MSG( m_formatSupported, false,
|
||||
wxT("error retrieving data from clipboard") );
|
||||
}
|
||||
|
||||
/* return success */
|
||||
delete[] array;
|
||||
|
||||
@@ -246,6 +246,7 @@ wxSize wxListBox::DoGetBestSize() const
|
||||
{
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
wxClientDC dc(const_cast<wxListBox*>(this));
|
||||
dc.SetFont(GetFont());
|
||||
#else
|
||||
wxMacPortStateHelper st( UMAGetWindowPort( (WindowRef)MacGetTopLevelWindowRef() ) );
|
||||
|
||||
@@ -288,9 +289,8 @@ wxSize wxListBox::DoGetBestSize() const
|
||||
#else
|
||||
wLine = ::TextWidth( str.c_str(), 0, str.length() );
|
||||
#endif
|
||||
|
||||
lbWidth = wxMax( lbWidth, wLine );
|
||||
#endif
|
||||
lbWidth = wxMax( lbWidth, wLine );
|
||||
}
|
||||
|
||||
// Add room for the scrollbar
|
||||
@@ -300,10 +300,10 @@ wxSize wxListBox::DoGetBestSize() const
|
||||
int cy = 12;
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
wxCoord width, height ;
|
||||
dc.GetTextExtent( wxT("X") , &width, &height);
|
||||
dc.GetTextExtent( wxT("XX") , &width, &height);
|
||||
int cx = width ;
|
||||
#else
|
||||
int cx = ::TextWidth( "X", 0, 1 );
|
||||
int cx = ::TextWidth( "XX", 0, 1 );
|
||||
#endif
|
||||
lbWidth += cx;
|
||||
|
||||
|
||||
@@ -53,68 +53,69 @@ int wxMessageDialog::ShowModal()
|
||||
alertType = kAlertCautionAlert;
|
||||
|
||||
#if TARGET_API_MAC_OSX
|
||||
CFStringRef defaultButtonTitle = NULL;
|
||||
CFStringRef alternateButtonTitle = NULL;
|
||||
CFStringRef otherButtonTitle = NULL;
|
||||
|
||||
wxMacCFStringHolder cfTitle( m_caption, m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfText( m_message, m_font.GetEncoding() );
|
||||
|
||||
wxMacCFStringHolder cfNoString( _("No"), m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfYesString( _("Yes"), m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfOKString( _("OK") , m_font.GetEncoding()) ;
|
||||
wxMacCFStringHolder cfCancelString( _("Cancel"), m_font.GetEncoding() );
|
||||
|
||||
int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ };
|
||||
|
||||
if (style & wxYES_NO)
|
||||
if ( !wxIsMainThread() )
|
||||
{
|
||||
if ( style & wxNO_DEFAULT )
|
||||
CFStringRef defaultButtonTitle = NULL;
|
||||
CFStringRef alternateButtonTitle = NULL;
|
||||
CFStringRef otherButtonTitle = NULL;
|
||||
|
||||
wxMacCFStringHolder cfTitle( m_caption, m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfText( m_message, m_font.GetEncoding() );
|
||||
|
||||
wxMacCFStringHolder cfNoString( _("No"), m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfYesString( _("Yes"), m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfOKString( _("OK") , m_font.GetEncoding()) ;
|
||||
wxMacCFStringHolder cfCancelString( _("Cancel"), m_font.GetEncoding() );
|
||||
|
||||
int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ };
|
||||
|
||||
if (style & wxYES_NO)
|
||||
{
|
||||
defaultButtonTitle = cfNoString;
|
||||
alternateButtonTitle = cfYesString;
|
||||
buttonId[0] = wxID_NO;
|
||||
buttonId[1] = wxID_YES;
|
||||
if ( style & wxNO_DEFAULT )
|
||||
{
|
||||
defaultButtonTitle = cfNoString;
|
||||
alternateButtonTitle = cfYesString;
|
||||
buttonId[0] = wxID_NO;
|
||||
buttonId[1] = wxID_YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultButtonTitle = cfYesString;
|
||||
alternateButtonTitle = cfNoString;
|
||||
buttonId[0] = wxID_YES;
|
||||
buttonId[1] = wxID_NO;
|
||||
}
|
||||
if (style & wxCANCEL)
|
||||
{
|
||||
otherButtonTitle = cfCancelString;
|
||||
buttonId[2] = wxID_CANCEL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultButtonTitle = cfYesString;
|
||||
alternateButtonTitle = cfNoString;
|
||||
buttonId[0] = wxID_YES;
|
||||
buttonId[1] = wxID_NO;
|
||||
}
|
||||
if (style & wxCANCEL)
|
||||
{
|
||||
otherButtonTitle = cfCancelString;
|
||||
buttonId[2] = wxID_CANCEL;
|
||||
// the MSW implementation even shows an OK button if it is not specified, we'll do the same
|
||||
buttonId[0] = wxID_OK;
|
||||
// using null as default title does not work on earlier systems
|
||||
defaultButtonTitle = cfOKString;
|
||||
if (style & wxCANCEL)
|
||||
{
|
||||
alternateButtonTitle = cfCancelString;
|
||||
buttonId[1] = wxID_CANCEL;
|
||||
}
|
||||
}
|
||||
|
||||
CFOptionFlags exitButton;
|
||||
OSStatus err = CFUserNotificationDisplayAlert(
|
||||
0, alertType, NULL, NULL, NULL, cfTitle, cfText,
|
||||
defaultButtonTitle, alternateButtonTitle, otherButtonTitle, &exitButton );
|
||||
if (err == noErr)
|
||||
resultbutton = buttonId[exitButton];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// the MSW implementation even shows an OK button if it is not specified, we'll do the same
|
||||
buttonId[0] = wxID_OK;
|
||||
// using null as default title does not work on earlier systems
|
||||
defaultButtonTitle = cfOKString;
|
||||
if (style & wxCANCEL)
|
||||
{
|
||||
alternateButtonTitle = cfCancelString;
|
||||
buttonId[1] = wxID_CANCEL;
|
||||
}
|
||||
}
|
||||
short result;
|
||||
|
||||
CFOptionFlags exitButton;
|
||||
OSStatus err = CFUserNotificationDisplayAlert(
|
||||
0, alertType, NULL, NULL, NULL, cfTitle, cfText,
|
||||
defaultButtonTitle, alternateButtonTitle, otherButtonTitle, &exitButton );
|
||||
if (err == noErr)
|
||||
resultbutton = buttonId[exitButton];
|
||||
|
||||
#else
|
||||
short result;
|
||||
|
||||
#if TARGET_CARBON
|
||||
if ( UMAGetSystemVersion() >= 0x1000 )
|
||||
{
|
||||
AlertStdCFStringAlertParamRec param;
|
||||
wxMacCFStringHolder cfNoString( _("No"), m_font.GetEncoding() );
|
||||
wxMacCFStringHolder cfYesString( _("Yes"), m_font.GetEncoding() );
|
||||
@@ -172,12 +173,6 @@ int wxMessageDialog::ShowModal()
|
||||
param.cancelButton = 0;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
else
|
||||
{
|
||||
skipDialog = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
param.position = kWindowDefaultPosition;
|
||||
if ( !skipDialog )
|
||||
@@ -190,114 +185,48 @@ int wxMessageDialog::ShowModal()
|
||||
{
|
||||
return wxID_CANCEL;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
AlertStdAlertParamRec param;
|
||||
Str255 yesPString, noPString;
|
||||
Str255 pascalTitle, pascalText;
|
||||
|
||||
wxMacStringToPascal( m_caption, pascalTitle );
|
||||
wxMacStringToPascal( _("Yes"), yesPString );
|
||||
wxMacStringToPascal( _("No"), noPString );
|
||||
wxMacStringToPascal( m_message, pascalText );
|
||||
|
||||
param.movable = true;
|
||||
param.filterProc = NULL;
|
||||
|
||||
if (style & wxYES_NO)
|
||||
if (style & wxOK)
|
||||
{
|
||||
if (style & wxCANCEL)
|
||||
switch ( result )
|
||||
{
|
||||
param.defaultText = yesPString;
|
||||
param.cancelText = (StringPtr) kAlertDefaultCancelText;
|
||||
param.otherText = noPString;
|
||||
param.helpButton = false;
|
||||
param.defaultButton = kAlertStdAlertOKButton;
|
||||
param.cancelButton = kAlertStdAlertCancelButton;
|
||||
}
|
||||
else
|
||||
{
|
||||
param.defaultText = yesPString;
|
||||
param.cancelText = NULL;
|
||||
param.otherText = noPString;
|
||||
param.helpButton = false;
|
||||
param.defaultButton = kAlertStdAlertOKButton;
|
||||
param.cancelButton = 0;
|
||||
case 1:
|
||||
resultbutton = wxID_OK;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// TODO: add Cancel button
|
||||
// if (style & wxCANCEL)
|
||||
// resultbutton = wxID_CANCEL;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (style & wxOK)
|
||||
else if (style & wxYES_NO)
|
||||
{
|
||||
if (style & wxCANCEL)
|
||||
switch ( result )
|
||||
{
|
||||
param.defaultText = (StringPtr) kAlertDefaultOKText;
|
||||
param.cancelText = (StringPtr) kAlertDefaultCancelText;
|
||||
param.otherText = NULL;
|
||||
param.helpButton = false;
|
||||
param.defaultButton = kAlertStdAlertOKButton;
|
||||
param.cancelButton = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
param.defaultText = (StringPtr) kAlertDefaultOKText;
|
||||
param.cancelText = NULL;
|
||||
param.otherText = NULL;
|
||||
param.helpButton = false;
|
||||
param.defaultButton = kAlertStdAlertOKButton;
|
||||
param.cancelButton = 0;
|
||||
case 1:
|
||||
resultbutton = wxID_YES;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (!(style & wxCANCEL))
|
||||
resultbutton = wxID_CANCEL;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
resultbutton = wxID_NO;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return resultbutton;
|
||||
}
|
||||
|
||||
param.position = 0;
|
||||
StandardAlert( alertType, pascalTitle, pascalText, ¶m, &result );
|
||||
}
|
||||
|
||||
if (style & wxOK)
|
||||
{
|
||||
switch ( result )
|
||||
{
|
||||
case 1:
|
||||
resultbutton = wxID_OK;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// TODO: add Cancel button
|
||||
// if (style & wxCANCEL)
|
||||
// resultbutton = wxID_CANCEL;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (style & wxYES_NO)
|
||||
{
|
||||
switch ( result )
|
||||
{
|
||||
case 1:
|
||||
resultbutton = wxID_YES;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (!(style & wxCANCEL))
|
||||
resultbutton = wxID_CANCEL;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
resultbutton = wxID_NO;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return resultbutton;
|
||||
}
|
||||
|
||||
@@ -68,6 +68,10 @@ public :
|
||||
|
||||
virtual void SetSearchMenu( wxMenu* menu );
|
||||
virtual wxMenu* GetSearchMenu() const;
|
||||
|
||||
virtual void SetDescriptiveText(const wxString& text);
|
||||
virtual wxString GetDescriptiveText() const;
|
||||
|
||||
protected :
|
||||
virtual void CreateControl( wxTextCtrl* peer, const Rect* bounds, CFStringRef crf );
|
||||
|
||||
@@ -167,6 +171,28 @@ wxMenu* wxMacSearchFieldControl::GetSearchMenu() const
|
||||
return m_menu;
|
||||
}
|
||||
|
||||
|
||||
void wxMacSearchFieldControl::SetDescriptiveText(const wxString& text)
|
||||
{
|
||||
verify_noerr( HISearchFieldSetDescriptiveText(
|
||||
m_controlRef,
|
||||
wxMacCFStringHolder( text, wxFont::GetDefaultEncoding() )));
|
||||
}
|
||||
|
||||
wxString wxMacSearchFieldControl::GetDescriptiveText() const
|
||||
{
|
||||
CFStringRef cfStr;
|
||||
verify_noerr( HISearchFieldCopyDescriptiveText( m_controlRef, &cfStr ));
|
||||
if ( cfStr )
|
||||
{
|
||||
return wxMacCFStringHolder(cfStr).AsString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return wxEmptyString;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
@@ -351,6 +377,16 @@ bool wxSearchCtrl::IsCancelButtonVisible() const
|
||||
return GetPeer()->IsCancelButtonVisible();
|
||||
}
|
||||
|
||||
void wxSearchCtrl::SetDescriptiveText(const wxString& text)
|
||||
{
|
||||
GetPeer()->SetDescriptiveText(text);
|
||||
}
|
||||
|
||||
wxString wxSearchCtrl::GetDescriptiveText() const
|
||||
{
|
||||
return GetPeer()->GetDescriptiveText();
|
||||
}
|
||||
|
||||
wxInt32 wxSearchCtrl::MacSearchFieldSearchHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, m_windowId );
|
||||
|
||||
@@ -78,7 +78,10 @@ wxSize wxStaticText::DoGetBestSize() const
|
||||
Point bounds;
|
||||
|
||||
// try the built-in best size if available
|
||||
Boolean former = m_peer->GetData<Boolean>( kControlStaticTextIsMultilineTag);
|
||||
m_peer->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 );
|
||||
m_peer->GetBestRect( &bestsize ) ;
|
||||
m_peer->SetData( kControlStaticTextIsMultilineTag, former );
|
||||
if ( !EmptyRect( &bestsize ) )
|
||||
{
|
||||
bounds.h = bestsize.right - bestsize.left ;
|
||||
|
||||
@@ -453,7 +453,7 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
|
||||
dc.DrawBitmap( m_bmpNormal, 0, 0, true );
|
||||
dc.SelectObject( wxNullBitmap );
|
||||
ControlButtonContentInfo info;
|
||||
wxMacCreateBitmapButton( &info, bmp );
|
||||
wxMacCreateBitmapButton( &info, bmp, kControlContentIconRef );
|
||||
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
|
||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||
if (m_toolbarItemRef != NULL)
|
||||
@@ -466,7 +466,7 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
|
||||
else
|
||||
{
|
||||
ControlButtonContentInfo info;
|
||||
wxMacCreateBitmapButton( &info, m_bmpNormal );
|
||||
wxMacCreateBitmapButton( &info, m_bmpNormal, kControlContentIconRef );
|
||||
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
|
||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||
if (m_toolbarItemRef != NULL)
|
||||
|
||||
@@ -929,7 +929,7 @@ bool wxTopLevelWindowMac::Create(wxWindow *parent,
|
||||
m_windowId = id == -1 ? NewControlId() : id;
|
||||
wxWindow::SetLabel( title ) ;
|
||||
|
||||
MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
|
||||
MacCreateRealWindow( title, pos , size , style , name ) ;
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
|
||||
|
||||
@@ -1110,6 +1110,20 @@ void wxTopLevelWindowMac::MacCreateRealWindow(
|
||||
wclass = kPlainWindowClass ;
|
||||
}
|
||||
}
|
||||
else if ( HasFlag( wxPOPUP_WINDOW ) )
|
||||
{
|
||||
// TEMPORARY HACK!
|
||||
// Until we've got a real wxPopupWindow class on wxMac make it a
|
||||
// little easier for wxFrame to be used to emulate it and workaround
|
||||
// the lack of wxPopupWindow.
|
||||
if ( HasFlag( wxBORDER_NONE ) )
|
||||
wclass = kHelpWindowClass ; // has no border
|
||||
else
|
||||
wclass = kPlainWindowClass ; // has a single line border, it will have to do for now
|
||||
//attr |= kWindowNoShadowAttribute; // turn off the shadow Should we??
|
||||
group = GetWindowGroupOfClass( // float above other windows
|
||||
kFloatingWindowClass) ;
|
||||
}
|
||||
else if ( HasFlag( wxCAPTION ) )
|
||||
{
|
||||
wclass = kDocumentWindowClass ;
|
||||
@@ -1156,6 +1170,9 @@ void wxTopLevelWindowMac::MacCreateRealWindow(
|
||||
if ( HasFlag(wxSTAY_ON_TOP) )
|
||||
group = GetWindowGroupOfClass(kUtilityWindowClass) ;
|
||||
|
||||
if ( HasFlag( wxFRAME_FLOAT_ON_PARENT ) )
|
||||
group = GetWindowGroupOfClass(kFloatingWindowClass) ;
|
||||
|
||||
attr |= kWindowCompositingAttribute;
|
||||
#if 0 // wxMAC_USE_CORE_GRAPHICS ; TODO : decide on overall handling of high dpi screens (pixel vs userscale)
|
||||
attr |= kWindowFrameworkScaledAttribute;
|
||||
|
||||
@@ -310,14 +310,17 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
|
||||
case kEventControlActivate :
|
||||
case kEventControlDeactivate :
|
||||
if ( thisWindow->IsKindOf( CLASSINFO( wxTreeCtrl ) )
|
||||
|| thisWindow->IsKindOf( CLASSINFO( wxListCtrl ) )
|
||||
)
|
||||
// FIXME: we should have a virtual function for this!
|
||||
#if wxUSE_TREECTRL
|
||||
if ( thisWindow->IsKindOf( CLASSINFO( wxTreeCtrl ) ) )
|
||||
thisWindow->Refresh();
|
||||
|
||||
//thisWindow->MacActivateStateChanged() ;
|
||||
break ;
|
||||
#endif
|
||||
#if wxUSE_LISTCTRL
|
||||
if ( thisWindow->IsKindOf( CLASSINFO( wxListCtrl ) ) )
|
||||
thisWindow->Refresh();
|
||||
#endif
|
||||
break ;
|
||||
#endif // TARGET_API_MAC_OSX
|
||||
|
||||
// we emulate this event under Carbon CFM
|
||||
case kEventControlSetFocusPart :
|
||||
|
||||
@@ -256,7 +256,10 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
|
||||
wxLogDebug(_T("DateTime_SetSystemtime() failed"));
|
||||
}
|
||||
|
||||
// we need to keep only the date part, times don't make sense for this
|
||||
// control (in particular, comparisons with other dates would fail)
|
||||
m_date = dt;
|
||||
m_date.ResetTime();
|
||||
}
|
||||
|
||||
wxDateTime wxDatePickerCtrl::GetValue() const
|
||||
|
||||
@@ -1020,6 +1020,8 @@ int wxFont::GetPointSize() const
|
||||
|
||||
wxSize wxFont::GetPixelSize() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), wxDefaultSize, wxT("invalid font") );
|
||||
|
||||
return M_FONTDATA->GetPixelSize();
|
||||
}
|
||||
|
||||
@@ -1074,12 +1076,14 @@ wxFontEncoding wxFont::GetEncoding() const
|
||||
|
||||
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
|
||||
{
|
||||
return M_FONTDATA->HasNativeFontInfo() ? &(M_FONTDATA->GetNativeFontInfo())
|
||||
return Ok() && M_FONTDATA->HasNativeFontInfo() ? &(M_FONTDATA->GetNativeFontInfo())
|
||||
: NULL;
|
||||
}
|
||||
|
||||
wxString wxFont::GetNativeFontInfoDesc() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
|
||||
|
||||
// be sure we have an HFONT associated...
|
||||
wxConstCast(this, wxFont)->RealizeResource();
|
||||
return wxFontBase::GetNativeFontInfoDesc();
|
||||
@@ -1087,6 +1091,8 @@ wxString wxFont::GetNativeFontInfoDesc() const
|
||||
|
||||
wxString wxFont::GetNativeFontInfoUserDesc() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
|
||||
|
||||
// be sure we have an HFONT associated...
|
||||
wxConstCast(this, wxFont)->RealizeResource();
|
||||
return wxFontBase::GetNativeFontInfoUserDesc();
|
||||
|
||||
@@ -427,12 +427,11 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
if ( pItem->IsOwnerDrawn() )
|
||||
{
|
||||
// is the item owner-drawn just because of the bitmap?
|
||||
if ( pItem->GetBitmap().Ok() &&
|
||||
// is the item owner-drawn just because of the [checked] bitmap?
|
||||
if ( (pItem->GetBitmap(false).Ok() || pItem->GetBitmap(true).Ok()) &&
|
||||
!pItem->GetTextColour().Ok() &&
|
||||
!pItem->GetBackgroundColour().Ok() &&
|
||||
!pItem->GetFont().Ok() &&
|
||||
!pItem->GetBitmap(true).Ok() )
|
||||
!pItem->GetFont().Ok() )
|
||||
{
|
||||
// try to use InsertMenuItem() as it's guaranteed to look correct
|
||||
// while our owner-drawn code is not
|
||||
@@ -445,6 +444,13 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||
if ( wxGetWinVersion() >= wxWinVersion_98 )
|
||||
{
|
||||
mii.fMask = MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
|
||||
if ( pItem->IsCheckable() )
|
||||
{
|
||||
// need to set checked/unchecked bitmaps as otherwise our
|
||||
// MSWOnDrawItem() item is not called
|
||||
mii.fMask |= MIIM_CHECKMARKS;
|
||||
}
|
||||
|
||||
mii.cch = itemText.length();
|
||||
mii.dwTypeData = wx_const_cast(wxChar *, itemText.c_str());
|
||||
|
||||
@@ -467,6 +473,11 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||
//
|
||||
// so instead draw it ourselves in MSWOnDrawItem()
|
||||
mii.dwItemData = wx_reinterpret_cast(ULONG_PTR, pItem);
|
||||
if ( pItem->IsCheckable() )
|
||||
{
|
||||
mii.hbmpChecked =
|
||||
mii.hbmpUnchecked = HBMMENU_CALLBACK;
|
||||
}
|
||||
mii.hbmpItem = HBMMENU_CALLBACK;
|
||||
|
||||
ok = ::InsertMenuItem(GetHmenu(), pos, TRUE /* by pos */, &mii);
|
||||
|
||||
@@ -159,6 +159,7 @@ wxString wxDataFormat::GetId() const
|
||||
if ( !len )
|
||||
{
|
||||
wxLogError(_("The clipboard format '%d' doesn't exist."), m_format);
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
return s;
|
||||
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
HWND m_hwnd; // window we're associated with
|
||||
|
||||
// get default drop effect for given keyboard flags
|
||||
static DWORD GetDropEffect(DWORD flags, wxDragResult defaultAction);
|
||||
static DWORD GetDropEffect(DWORD flags, wxDragResult defaultAction, DWORD pdwEffect);
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxIDropTarget)
|
||||
};
|
||||
@@ -104,11 +104,31 @@ static DWORD ConvertDragResultToEffect(wxDragResult result);
|
||||
// Notes : We do "move" normally and "copy" if <Ctrl> is pressed,
|
||||
// which is the standard behaviour (currently there is no
|
||||
// way to redefine it)
|
||||
DWORD wxIDropTarget::GetDropEffect(DWORD flags, wxDragResult defaultAction)
|
||||
DWORD wxIDropTarget::GetDropEffect(DWORD flags,
|
||||
wxDragResult defaultAction,
|
||||
DWORD pdwEffect)
|
||||
{
|
||||
if (defaultAction == wxDragCopy)
|
||||
return flags & MK_SHIFT ? DROPEFFECT_MOVE : DROPEFFECT_COPY;
|
||||
return flags & MK_CONTROL ? DROPEFFECT_COPY : DROPEFFECT_MOVE;
|
||||
DWORD effectiveAction;
|
||||
if ( defaultAction == wxDragCopy )
|
||||
effectiveAction = flags & MK_SHIFT ? DROPEFFECT_MOVE : DROPEFFECT_COPY;
|
||||
else
|
||||
effectiveAction = flags & MK_CONTROL ? DROPEFFECT_COPY : DROPEFFECT_MOVE;
|
||||
|
||||
if ( !(effectiveAction & pdwEffect) )
|
||||
{
|
||||
// the action is not supported by drag source, fall back to something
|
||||
// that it does support
|
||||
if ( pdwEffect & DROPEFFECT_MOVE )
|
||||
effectiveAction = DROPEFFECT_MOVE;
|
||||
else if ( pdwEffect & DROPEFFECT_COPY )
|
||||
effectiveAction = DROPEFFECT_COPY;
|
||||
else if ( pdwEffect & DROPEFFECT_LINK )
|
||||
effectiveAction = DROPEFFECT_LINK;
|
||||
else
|
||||
effectiveAction = DROPEFFECT_NONE;
|
||||
}
|
||||
|
||||
return effectiveAction;
|
||||
}
|
||||
|
||||
wxIDropTarget::wxIDropTarget(wxDropTarget *pTarget)
|
||||
@@ -187,7 +207,7 @@ STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource,
|
||||
// give some visual feedback
|
||||
*pdwEffect = ConvertDragResultToEffect(
|
||||
m_pTarget->OnEnter(pt.x, pt.y, ConvertDragEffectToResult(
|
||||
GetDropEffect(grfKeyState, m_pTarget->GetDefaultAction()))
|
||||
GetDropEffect(grfKeyState, m_pTarget->GetDefaultAction(), *pdwEffect))
|
||||
)
|
||||
);
|
||||
|
||||
@@ -212,7 +232,7 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState,
|
||||
wxDragResult result;
|
||||
if ( m_pIDataObject ) {
|
||||
result = ConvertDragEffectToResult(
|
||||
GetDropEffect(grfKeyState, m_pTarget->GetDefaultAction()));
|
||||
GetDropEffect(grfKeyState, m_pTarget->GetDefaultAction(), *pdwEffect));
|
||||
}
|
||||
else {
|
||||
// can't accept data anyhow normally
|
||||
@@ -269,9 +289,6 @@ STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource,
|
||||
// that it's the same we've already got in DragEnter
|
||||
wxASSERT( m_pIDataObject == pIDataSource );
|
||||
|
||||
// by default, nothing happens
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
|
||||
// we need client coordinates to pass to wxWin functions
|
||||
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
||||
{
|
||||
@@ -285,15 +302,20 @@ STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource,
|
||||
|
||||
// and now it has the data
|
||||
wxDragResult rc = ConvertDragEffectToResult(
|
||||
GetDropEffect(grfKeyState, m_pTarget->GetDefaultAction()));
|
||||
GetDropEffect(grfKeyState, m_pTarget->GetDefaultAction(), *pdwEffect));
|
||||
rc = m_pTarget->OnData(pt.x, pt.y, rc);
|
||||
if ( wxIsDragResultOk(rc) ) {
|
||||
// operation succeeded
|
||||
*pdwEffect = ConvertDragResultToEffect(rc);
|
||||
}
|
||||
//else: *pdwEffect is already DROPEFFECT_NONE
|
||||
else {
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// OnDrop() returned false, no need to copy data
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
}
|
||||
//else: OnDrop() returned false, no need to copy data
|
||||
|
||||
// release the held object
|
||||
RELEASE_AND_NULL(m_pIDataObject);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/dcmemory.h"
|
||||
#include "wx/menu.h"
|
||||
#include "wx/utils.h"
|
||||
@@ -421,9 +422,20 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||
|
||||
if ( !bmp.Ok() )
|
||||
{
|
||||
// for not checkable bitmaps we should always use unchecked one because
|
||||
// their checked bitmap is not set
|
||||
// for not checkable bitmaps we should always use unchecked one
|
||||
// because their checked bitmap is not set
|
||||
bmp = GetBitmap(!IsCheckable() || (st & wxODChecked));
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
if ( bmp.Ok() && st & wxODDisabled )
|
||||
{
|
||||
// we need to grey out the bitmap as we don't have any specific
|
||||
// disabled bitmap
|
||||
wxImage imgGrey = bmp.ConvertToImage().ConvertToGreyscale();
|
||||
if ( imgGrey.Ok() )
|
||||
bmp = wxBitmap(imgGrey);
|
||||
}
|
||||
#endif // wxUSE_IMAGE
|
||||
}
|
||||
|
||||
if ( bmp.Ok() )
|
||||
|
||||
@@ -111,7 +111,6 @@ wxCONSTRUCTOR_6( wxSpinCtrl , wxWindow* , Parent , wxWindowID , Id , wxString ,
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
|
||||
#endif
|
||||
|
||||
//pmg EVT_KILL_FOCUS
|
||||
BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
|
||||
EVT_CHAR(wxSpinCtrl::OnChar)
|
||||
|
||||
@@ -269,15 +268,17 @@ void wxSpinCtrl::OnSetFocus(wxFocusEvent& event)
|
||||
|
||||
void wxSpinCtrl::NormalizeValue()
|
||||
{
|
||||
int value = GetValue();
|
||||
SetValue( value );
|
||||
if (value != m_oldValue)
|
||||
const int value = GetValue();
|
||||
const bool changed = value != m_oldValue;
|
||||
|
||||
// notice that we have to call SetValue() even if the value didn't change
|
||||
// because otherwise we could be left with empty buddy control when value
|
||||
// is 0, see comment in SetValue()
|
||||
SetValue(value);
|
||||
|
||||
if ( changed )
|
||||
{
|
||||
wxCommandEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, GetId() );
|
||||
event.SetEventObject( this );
|
||||
event.SetInt( value );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
m_oldValue = value;
|
||||
SendSpinUpdate(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,6 +295,11 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
||||
int min, int max, int initial,
|
||||
const wxString& name)
|
||||
{
|
||||
// this should be in ctor/init function but I don't want to add one to 2.8
|
||||
// to avoid problems with default ctor which can be inlined in the user
|
||||
// code and so might not get this fix without recompilation
|
||||
m_oldValue = INT_MIN;
|
||||
|
||||
// before using DoGetBestSize(), have to set style to let the base class
|
||||
// know whether this is a horizontal or vertical control (we're always
|
||||
// vertical)
|
||||
@@ -541,27 +547,29 @@ void wxSpinCtrl::DoSetToolTip(wxToolTip *tip)
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event processing
|
||||
// events processing and generation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxSpinCtrl::OnSpinChange(wxSpinEvent& eventSpin)
|
||||
void wxSpinCtrl::SendSpinUpdate(int value)
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, GetId());
|
||||
event.SetEventObject(this);
|
||||
int value = eventSpin.GetPosition();
|
||||
event.SetInt( value );
|
||||
event.SetInt(value);
|
||||
|
||||
if (value != m_oldValue)
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
if ( eventSpin.GetSkipped() )
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
m_oldValue = value;
|
||||
}
|
||||
|
||||
void wxSpinCtrl::OnSpinChange(wxSpinEvent& eventSpin)
|
||||
{
|
||||
const int value = eventSpin.GetPosition();
|
||||
if ( value != m_oldValue )
|
||||
{
|
||||
SendSpinUpdate(value);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// size calculations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -1071,9 +1071,9 @@ bool wxToolBar::Realize()
|
||||
}
|
||||
else if ( m_nButtons > 0 ) // vertical non empty toolbar
|
||||
{
|
||||
if ( m_maxRows == 0 )
|
||||
// if not set yet, have one column
|
||||
SetRows(m_nButtons);
|
||||
// if not set yet, have one column
|
||||
m_maxRows = 1;
|
||||
SetRows(m_nButtons);
|
||||
}
|
||||
|
||||
InvalidateBestSize();
|
||||
|
||||
@@ -803,7 +803,30 @@ bool wxWindowMSW::SetCursor(const wxCursor& cursor)
|
||||
// don't "overwrite" busy cursor
|
||||
if ( m_cursor.Ok() && !wxIsBusy() )
|
||||
{
|
||||
::SetCursor(GetHcursorOf(m_cursor));
|
||||
// normally we should change the cursor only if it's over this window
|
||||
// but we should do it always if we capture the mouse currently
|
||||
bool set = HasCapture();
|
||||
if ( !set )
|
||||
{
|
||||
HWND hWnd = GetHwnd();
|
||||
|
||||
POINT point;
|
||||
#ifdef __WXWINCE__
|
||||
::GetCursorPosWinCE(&point);
|
||||
#else
|
||||
::GetCursorPos(&point);
|
||||
#endif
|
||||
|
||||
RECT rect = wxGetWindowRect(hWnd);
|
||||
|
||||
set = ::PtInRect(&rect, point) != 0;
|
||||
}
|
||||
|
||||
if ( set )
|
||||
{
|
||||
::SetCursor(GetHcursorOf(m_cursor));
|
||||
}
|
||||
//else: will be set later when the mouse enters this window
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -791,9 +791,10 @@ public:
|
||||
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
|
||||
wxPopupWindow(parent, wxBORDER_NONE)
|
||||
{
|
||||
|
||||
SetBackgroundColour(*wxBLACK); // for our simple border
|
||||
|
||||
lv = new wxSTCListBox(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||
lv = new wxSTCListBox(parent, id, wxPoint(-50,-50), wxDefaultSize,
|
||||
wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER | wxBORDER_NONE);
|
||||
lv->SetCursor(wxCursor(wxCURSOR_ARROW));
|
||||
lv->InsertColumn(0, wxEmptyString);
|
||||
@@ -897,17 +898,27 @@ END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
||||
#else // wxUSE_POPUPWIN -----------------------------------
|
||||
#else // !wxUSE_POPUPWIN -----------------------------------
|
||||
|
||||
// A normal window to place the wxSTCListBox upon.
|
||||
class wxSTCListBoxWin : public wxWindow {
|
||||
// A normal window to place the wxSTCListBox upon, but make it behave as much
|
||||
// like a wxPopupWindow as possible
|
||||
class wxSTCListBoxWin : public wxFrame {
|
||||
private:
|
||||
wxListView* lv;
|
||||
CallBackAction doubleClickAction;
|
||||
void* doubleClickActionData;
|
||||
public:
|
||||
wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) :
|
||||
wxWindow(parent, id, wxPoint(location.x, location.y), wxSize(0,0), wxSIMPLE_BORDER )
|
||||
wxFrame(parent, id, wxEmptyString, wxPoint(location.x, location.y), wxSize(0,0),
|
||||
wxFRAME_NO_TASKBAR
|
||||
| wxFRAME_FLOAT_ON_PARENT
|
||||
#ifdef __WXMAC__
|
||||
| wxPOPUP_WINDOW
|
||||
| wxNO_BORDER
|
||||
#else
|
||||
| wxSIMPLE_BORDER
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
lv = new wxSTCListBox(this, id, wxDefaultPosition, wxDefaultSize,
|
||||
@@ -928,7 +939,8 @@ public:
|
||||
// messages/events for the list control when Scintilla wants to
|
||||
// close it, so do a pending delete of it instead of destroying
|
||||
// immediately.
|
||||
bool Destroy() {
|
||||
bool Destroy()
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
// The bottom edge of this window is not getting properly
|
||||
// refreshed upon deletion, so help it out...
|
||||
@@ -943,7 +955,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
int IconWidth() {
|
||||
int IconWidth()
|
||||
{
|
||||
wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL);
|
||||
if (il != NULL) {
|
||||
int w, h;
|
||||
@@ -954,18 +967,22 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void SetDoubleClickAction(CallBackAction action, void *data) {
|
||||
void SetDoubleClickAction(CallBackAction action, void *data)
|
||||
{
|
||||
doubleClickAction = action;
|
||||
doubleClickActionData = data;
|
||||
}
|
||||
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
void OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
ActivateParent();
|
||||
GetParent()->SetFocus();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnSize(wxSizeEvent& event) {
|
||||
void OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// resize the child
|
||||
wxSize sz = GetClientSize();
|
||||
lv->SetSize(sz);
|
||||
@@ -976,15 +993,44 @@ public:
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void ActivateParent()
|
||||
{
|
||||
// Although we're a frame, we always want the parent to be active, so
|
||||
// raise it whenever we get shown, focused, etc.
|
||||
wxTopLevelWindow *frame = wxDynamicCast(
|
||||
wxGetTopLevelParent(GetParent()), wxTopLevelWindow);
|
||||
if (frame)
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO)
|
||||
{
|
||||
// convert coords to screen coords since we're a top-level window
|
||||
if (x != wxDefaultCoord) {
|
||||
GetParent()->ClientToScreen(&x, NULL);
|
||||
}
|
||||
if (y != wxDefaultCoord) {
|
||||
GetParent()->ClientToScreen(NULL, &y);
|
||||
}
|
||||
wxFrame::DoSetSize(x, y, width, height, sizeFlags);
|
||||
}
|
||||
|
||||
virtual bool Show(bool show = true)
|
||||
{
|
||||
bool rv = wxFrame::Show(show);
|
||||
if (rv && show)
|
||||
ActivateParent();
|
||||
#ifdef __WXMAC__
|
||||
virtual bool Show(bool show = true) {
|
||||
bool rv = wxWindow::Show(show);
|
||||
GetParent()->Refresh(false);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
void OnActivate(wxListEvent& WXUNUSED(event)) {
|
||||
void OnActivate(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
doubleClickAction(doubleClickActionData);
|
||||
}
|
||||
|
||||
@@ -1193,7 +1239,7 @@ void ListBoxImpl::Select(int n) {
|
||||
n = 0;
|
||||
select = false;
|
||||
}
|
||||
GETLB(id)->Focus(n);
|
||||
GETLB(id)->EnsureVisible(n);
|
||||
GETLB(id)->Select(n, select);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ void wxSTCDropTarget::OnLeave() {
|
||||
#define wxSTCCallTipBase wxPopupWindow
|
||||
#define param2 wxBORDER_NONE // popup's 2nd param is flags
|
||||
#else
|
||||
#define wxSTCCallTipBase wxWindow
|
||||
#define wxSTCCallTipBase wxFrame
|
||||
#define param2 -1 // wxWindow's 2nd param is ID
|
||||
#endif
|
||||
|
||||
@@ -95,8 +95,19 @@ void wxSTCDropTarget::OnLeave() {
|
||||
|
||||
class wxSTCCallTip : public wxSTCCallTipBase {
|
||||
public:
|
||||
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx)
|
||||
: wxSTCCallTipBase(parent, param2),
|
||||
wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx) :
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
wxSTCCallTipBase(parent, wxBORDER_NONE),
|
||||
#else
|
||||
wxSTCCallTipBase(parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxFRAME_NO_TASKBAR
|
||||
| wxFRAME_FLOAT_ON_PARENT
|
||||
| wxBORDER_NONE
|
||||
#ifdef __WXMAC__
|
||||
| wxPOPUP_WINDOW
|
||||
#endif
|
||||
),
|
||||
#endif
|
||||
m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord)
|
||||
{
|
||||
}
|
||||
@@ -112,7 +123,8 @@ public:
|
||||
|
||||
bool AcceptsFocus() const { return false; }
|
||||
|
||||
void OnPaint(wxPaintEvent& WXUNUSED(evt)) {
|
||||
void OnPaint(wxPaintEvent& WXUNUSED(evt))
|
||||
{
|
||||
wxBufferedPaintDC dc(this);
|
||||
Surface* surfaceWindow = Surface::Allocate();
|
||||
surfaceWindow->Init(&dc, m_ct->wDraw.GetID());
|
||||
@@ -121,22 +133,25 @@ public:
|
||||
delete surfaceWindow;
|
||||
}
|
||||
|
||||
void OnFocus(wxFocusEvent& event) {
|
||||
void OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
GetParent()->SetFocus();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void OnLeftDown(wxMouseEvent& event) {
|
||||
void OnLeftDown(wxMouseEvent& event)
|
||||
{
|
||||
wxPoint pt = event.GetPosition();
|
||||
Point p(pt.x, pt.y);
|
||||
m_ct->MouseClick(p);
|
||||
m_swx->CallTipClick();
|
||||
}
|
||||
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) {
|
||||
int sizeFlags = wxSIZE_AUTO)
|
||||
{
|
||||
// convert coords to screen coords since we're a top-level window
|
||||
if (x != wxDefaultCoord) {
|
||||
m_cx = x;
|
||||
GetParent()->ClientToScreen(&x, NULL);
|
||||
@@ -147,9 +162,27 @@ public:
|
||||
}
|
||||
wxSTCCallTipBase::DoSetSize(x, y, width, height, sizeFlags);
|
||||
}
|
||||
|
||||
#if wxUSE_POPUPWIN && wxSTC_USE_POPUP
|
||||
#else
|
||||
virtual bool Show( bool show = true )
|
||||
{
|
||||
// Although we're a frame, we always want the parent to be active, so
|
||||
// raise it whenever we get shown.
|
||||
bool rv = wxSTCCallTipBase::Show(show);
|
||||
if (rv && show)
|
||||
{
|
||||
wxTopLevelWindow *frame = wxDynamicCast(
|
||||
wxGetTopLevelParent(GetParent()), wxTopLevelWindow);
|
||||
if (frame)
|
||||
frame->Raise();
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
wxPoint GetMyPosition() {
|
||||
wxPoint GetMyPosition()
|
||||
{
|
||||
return wxPoint(m_cx, m_cy);
|
||||
}
|
||||
|
||||
|
||||
@@ -1079,24 +1079,30 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
|
||||
// and scrolling direction
|
||||
// 2. if scrolling in both axes, scroll all children
|
||||
|
||||
bool shouldMove = false;
|
||||
|
||||
if ( rect && (dx * dy == 0 /* moving in only one of x, y axis */) )
|
||||
{
|
||||
wxRect childRect = child->GetRect();
|
||||
if ( dx == 0 && (childRect.GetLeft() <= rect->GetRight() ||
|
||||
childRect.GetRight() >= rect->GetLeft()) )
|
||||
{
|
||||
child->Move(child->GetPosition() + offset);
|
||||
shouldMove = true;
|
||||
}
|
||||
else if ( dy == 0 && (childRect.GetTop() <= rect->GetBottom() ||
|
||||
childRect.GetBottom() >= rect->GetTop()) )
|
||||
{
|
||||
child->Move(child->GetPosition() + offset);
|
||||
shouldMove = true;
|
||||
}
|
||||
// else: child outside of scrolling shaft, don't move
|
||||
}
|
||||
else
|
||||
else // scrolling in both axes or rect=NULL
|
||||
{
|
||||
child->Move(child->GetPosition() + offset);
|
||||
shouldMove = true;
|
||||
}
|
||||
|
||||
if ( shouldMove )
|
||||
child->Move(child->GetPosition() + offset, wxSIZE_ALLOW_MINUS_ONE);
|
||||
}
|
||||
#endif // wxX11/!wxX11
|
||||
}
|
||||
|
||||
@@ -191,8 +191,10 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
|
||||
if (m_class == wxT("wxBoxSizer"))
|
||||
sizer = Handle_wxBoxSizer();
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
else if (m_class == wxT("wxStaticBoxSizer"))
|
||||
sizer = Handle_wxStaticBoxSizer();
|
||||
#endif
|
||||
|
||||
else if (m_class == wxT("wxGridSizer"))
|
||||
sizer = Handle_wxGridSizer();
|
||||
@@ -251,6 +253,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxBoxSizer()
|
||||
return new wxBoxSizer(GetStyle(wxT("orient"), wxHORIZONTAL));
|
||||
}
|
||||
|
||||
#if wxUSE_STATBOX
|
||||
wxSizer* wxSizerXmlHandler::Handle_wxStaticBoxSizer()
|
||||
{
|
||||
return new wxStaticBoxSizer(
|
||||
@@ -262,6 +265,7 @@ wxSizer* wxSizerXmlHandler::Handle_wxStaticBoxSizer()
|
||||
GetName()),
|
||||
GetStyle(wxT("orient"), wxHORIZONTAL));
|
||||
}
|
||||
#endif // wxUSE_STATBOX
|
||||
|
||||
wxSizer* wxSizerXmlHandler::Handle_wxGridSizer()
|
||||
{
|
||||
|
||||
@@ -191,6 +191,7 @@ private:
|
||||
CPPUNIT_TEST( TestDateParse );
|
||||
CPPUNIT_TEST( TestTimeArithmetics );
|
||||
CPPUNIT_TEST( TestDSTBug );
|
||||
CPPUNIT_TEST( TestDateOnly );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
void TestLeapYears();
|
||||
@@ -206,6 +207,7 @@ private:
|
||||
void TestDateParse();
|
||||
void TestTimeArithmetics();
|
||||
void TestDSTBug();
|
||||
void TestDateOnly();
|
||||
|
||||
DECLARE_NO_COPY_CLASS(DateTimeTestCase)
|
||||
};
|
||||
@@ -920,4 +922,20 @@ void DateTimeTestCase::TestDSTBug()
|
||||
#endif // CHANGE_SYSTEM_DATE
|
||||
}
|
||||
|
||||
void DateTimeTestCase::TestDateOnly()
|
||||
{
|
||||
wxDateTime dt(19, wxDateTime::Jan, 2007, 15, 01, 00);
|
||||
|
||||
static const wxDateTime::wxDateTime_t DATE_ZERO = 0;
|
||||
CPPUNIT_ASSERT_EQUAL( DATE_ZERO, dt.GetDateOnly().GetHour() );
|
||||
CPPUNIT_ASSERT_EQUAL( DATE_ZERO, dt.GetDateOnly().GetMinute() );
|
||||
CPPUNIT_ASSERT_EQUAL( DATE_ZERO, dt.GetDateOnly().GetSecond() );
|
||||
CPPUNIT_ASSERT_EQUAL( DATE_ZERO, dt.GetDateOnly().GetMillisecond() );
|
||||
|
||||
dt.ResetTime();
|
||||
CPPUNIT_ASSERT_EQUAL( wxDateTime(19, wxDateTime::Jan, 2007), dt );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( wxDateTime::Today(), wxDateTime::Now().GetDateOnly() );
|
||||
}
|
||||
|
||||
#endif // wxUSE_DATETIME
|
||||
|
||||
@@ -59,6 +59,7 @@ private:
|
||||
CPPUNIT_TEST( ConversionUTF8 );
|
||||
CPPUNIT_TEST( ConversionUTF16 );
|
||||
CPPUNIT_TEST( ConversionUTF32 );
|
||||
CPPUNIT_TEST( IsConvOk );
|
||||
#endif // wxUSE_WCHAR_T
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
@@ -71,6 +72,7 @@ private:
|
||||
void ConversionUTF8();
|
||||
void ConversionUTF16();
|
||||
void ConversionUTF32();
|
||||
void IsConvOk();
|
||||
|
||||
// test if converting s using the given encoding gives ws and vice versa
|
||||
//
|
||||
@@ -241,7 +243,18 @@ void UnicodeTestCase::ConversionUTF7()
|
||||
for ( size_t n = 0; n < WXSIZEOF(utf7data); n++ )
|
||||
{
|
||||
const StringConversionData& d = utf7data[n];
|
||||
|
||||
// converting to/from UTF-7 using iconv() currently doesn't work
|
||||
// because of several problems:
|
||||
// - GetMBNulLen() doesn't return correct result (iconv converts L'\0'
|
||||
// to an incomplete and anyhow nonsensical "+AA" string)
|
||||
// - iconv refuses to convert "+-" (although it converts "+-\n" just
|
||||
// fine, go figure)
|
||||
//
|
||||
// I have no idea how to fix this so just disable the test for now
|
||||
#if 0
|
||||
DoTestConversion(d.str, d.wcs, conv);
|
||||
#endif
|
||||
DoTestConversion(d.str, d.wcs, wxConvUTF7);
|
||||
}
|
||||
}
|
||||
@@ -317,5 +330,16 @@ void UnicodeTestCase::ConversionUTF32()
|
||||
CPPUNIT_ASSERT_EQUAL( (size_t)3, len );
|
||||
}
|
||||
|
||||
void UnicodeTestCase::IsConvOk()
|
||||
{
|
||||
CPPUNIT_ASSERT( wxCSConv(wxFONTENCODING_SYSTEM).IsOk() );
|
||||
CPPUNIT_ASSERT( wxCSConv(_T("UTF-8")).IsOk() );
|
||||
CPPUNIT_ASSERT( !wxCSConv(_T("NoSuchConversion")).IsOk() );
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
CPPUNIT_ASSERT( wxCSConv(_T("WINDOWS-437")).IsOk() );
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // wxUSE_WCHAR_T
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user