Vadim Zeitlin [Mon, 26 Mar 2007 23:46:31 +0000 (23:46 +0000)]
make Ctrl-PageUp/Down work for changing notebook pages even when there is a wxWindow (i.e. not a native wxControl) in the hierarchy; this comes at the price of not being able to use the same key combinations for horizontal scrolling of the windows which do not have wxHSCROLL style and this seems like an acceptable tradeoff
Václav Slavík [Mon, 26 Mar 2007 20:28:04 +0000 (20:28 +0000)]
Preparing wxString for UTF-8 representation:
1) split into wxStringImpl class that has std::string-like API and operates on char* or wchar_t* data and wxString class that provides Unicode iterators and indexes
2) added both char* and wchar_t* versions of many wxString methods to avoid having to use _T()
Robin Dunn [Mon, 26 Mar 2007 20:08:41 +0000 (20:08 +0000)]
Forward port of my recent changes in the 2.8 branch:
* Force use of floating point math in wxGCDC::DoDrawEllipticArc.
* Check for 0.5 offset in wxGCDC::DoDrawRoundedRectangle and
DoDrawEllipse. Set wxGDIPlusContext to use the offset.
* Avoid crash in wxStdDialogButtonSizer::Realize if there is no
negative button.
* Provide implementations for wxCairoPathData::AddPath,
wxCairoContext::Clip, wxCairoContext::DrawBitmap,
wxCairoContext::DrawIcon, and wxCairoContext::GetTextExtent.
* Fix wxCairoContext::DrawText to draw the text using the upper-left
corner for the x,y position, not the baseline.
* Fix wxMacCoreGraphicsRenderer::CreateContext to be able to use a
wxMemoryDC as the target.
* Map wxTELETYPE font family on wxMac to a monospace font.
Vadim Zeitlin [Sun, 25 Mar 2007 22:36:24 +0000 (22:36 +0000)]
don't check whether the window is shown and enabled in AcceptsFocus() itself
as it makes overriding it in derived classes problematic; provide a separate
non virtual CanAcceptFocus() method checking whether the window accepts focus
and if it can accept it now and use it instead of AcceptsFocus(); documented
AcceptsFocus() and AcceptsFocusFromKeyboard()
Vadim Zeitlin [Sun, 25 Mar 2007 21:17:19 +0000 (21:17 +0000)]
why was this class made a wxControlContainer (rev. 1.7), this doesn't seem to make sense -- and if it does it should probably be done at the base class level, not here
Vadim Zeitlin [Fri, 23 Mar 2007 15:16:08 +0000 (15:16 +0000)]
fixed compilation for Windows compilers now after last change: replaced conversions to ushort and uint with a conversion to wint_t but do it for (non-Apple) gcc only
Kevin Ollivier [Fri, 23 Mar 2007 14:53:55 +0000 (14:53 +0000)]
If using the system Window menu on OS X, integrate any Window wxMenu items into the system menu, rather than having duplicate Window menus (current behavior).
Vadim Zeitlin [Fri, 23 Mar 2007 14:01:53 +0000 (14:01 +0000)]
make IsEnabled() return false even if the window parent, and not the window itself, is disabled and added IsThisEnabled() implementing the old IsEnabled() behaviour; also significantly simplify the window state management code in all ports by factoring out the common parts in wxWindowBase
Vadim Zeitlin [Fri, 23 Mar 2007 01:45:17 +0000 (01:45 +0000)]
removed dll export declaration for wxCStrData: it's unneeded because the class is fully inline and creates problems with mingw32 3.4.2 which wanrs about functions defined locally after being declared with dll linkage and then fails to link wxBase DLL
Vadim Zeitlin [Fri, 23 Mar 2007 00:04:15 +0000 (00:04 +0000)]
fix DLL build with MSVC: it wasn't happy that some functions of a template class were not implemented, so get rid of FromCStrData() and implement its logic in one of the 2 derived classes ctors instead
Vadim Zeitlin [Thu, 22 Mar 2007 19:24:41 +0000 (19:24 +0000)]
added explicit conversion of wxCStrData to const void * to resolve ambiguity between const char * and const unsigned char * conversion when passing s.c_str() to e.g. file output functions
Vadim Zeitlin [Thu, 22 Mar 2007 19:13:50 +0000 (19:13 +0000)]
remove wxWINT_T_IS_TYPEDEF as it seems wint_t is always a typedef (although it can be either unsigned short or unsigned int or possibly something else)
Vadim Zeitlin [Thu, 22 Mar 2007 18:03:02 +0000 (18:03 +0000)]
added macros to avoid code repetition when defining comparison operators; use them to replace existing operators in wxUniChar and wxUniCharRef (fixing bug in the operator== and != of the latter) and added comparison operators for const wxChar * and wxCStrData which are needed to compile existing code comparing pointers with s.c_str()
Vadim Zeitlin [Thu, 22 Mar 2007 17:26:09 +0000 (17:26 +0000)]
add operator+=(unsigned char) for backwards compatibility and because we generally handle both signed and unisnged chars everywhere; added wxString(const wxCStrData&, size_t) ctor to resolve ambiguity between wxString(const char *, size_t) and wxString(const unsigned char *, size_t) and wxString(const wxString&, size_t) to resolved embiguity for string parameter of ctor
Vadim Zeitlin [Thu, 22 Mar 2007 15:24:28 +0000 (15:24 +0000)]
added conversion to unsigned int too: this is needed to be able to pass s[n] to standard toxxx/isyyy() functions under Windows when _MBCS is defined as they're mapped to _mbzzz(unsigned int) in this case
Vadim Zeitlin [Thu, 22 Mar 2007 15:20:50 +0000 (15:20 +0000)]
removed Matches(const wxChar *, int=0) overload: it creates ambiguity with Matches(const wxString&, int=0) one when re.Matches(s.c_str()) is called now that c_str() returns wxCStrData which can be converted to both const wxChar * and wxString
Vadim Zeitlin [Thu, 22 Mar 2007 02:25:25 +0000 (02:25 +0000)]
call GetTextExtent() after selecting the correct font into DC in PaintForeground(), fixes label drawing for non default font sizes (part of patch 1683573)
Vadim Zeitlin [Tue, 20 Mar 2007 13:39:31 +0000 (13:39 +0000)]
removed unnecessary WXDLLIMPEXP_CORE from private classes (fixes VC warning about DLL-exported class using non DLL-exported GraphicsStates in DLL build)
Vadim Zeitlin [Tue, 20 Mar 2007 13:29:36 +0000 (13:29 +0000)]
prevent GTK+ from changing locale when wxUSE_INTL==0, this makes the behaviour consistent with the other ports in this case too (and not only when wxUSE_INTL==1 and the locale is changed (in all ports))
Vadim Zeitlin [Mon, 19 Mar 2007 13:19:56 +0000 (13:19 +0000)]
added wxString::operator=(const wxCStrData&) to make it possible to compile code like "wxString s = s.c_str() + 1" again (also fixes wxGTK1 compilation)
Vadim Zeitlin [Mon, 19 Mar 2007 13:18:02 +0000 (13:18 +0000)]
added ctor for wxChar/WCharBuffer from wxCStrData in ANSI/Unicode build to make it possible to compile code like "wxCharBuffer buf = s.c_str()" again (in particular, fixes wxGTK1 compilation)
Vadim Zeitlin [Mon, 19 Mar 2007 01:37:22 +0000 (01:37 +0000)]
return wxFONTENCODING_ISO8859_1, not wxFONTENCODING_SYSTEM, from wxLocale::GetSystemEncoding() when locale is C under Unix (why didn't we do this before?)