Only define WXUSINGDLL in multilib builds for wxscintilla.lib.
In monolithic builds wxscintilla is linked directly into the one and only wx
DLL and doesn't need to import anything from it, WXUSINGDLL is only needed in
multilib case when wxscintilla is part of wxCore DLL and does need to import
symbols (e.g. wxQsort() used by wxVector) from wxBase one.
Correct creation of the mask for wxImage cursors in wxGTK.
The code created the monochrome bitmap used by wxCursor(wxImage) ctor
incorrectly resulting in bad cursor appearance. Use the right values for
foreground and background pixels (which are inversed compared to naive
expectations) to fix this.
Build fix: don't test for __WXMSW__ using #if in wx/defs.h.
__WXMSW__ should be tested using #ifdef but in fact there doesn't seem to be
any need to test for it at all here as __CYGWIN__ implies __WXMSW__ anyhow.
Jaakko Salli [Sun, 25 Jul 2010 10:36:19 +0000 (10:36 +0000)]
Refactored validation of numeric properties (wxIntProperty, wxUIntProperty and wxFloatProperty). They now use (basically) a single template function instead of three separate ones.
Jaakko Salli [Sun, 25 Jul 2010 09:30:50 +0000 (09:30 +0000)]
Added wxVariant::Convert() implementations for wx(U)LongLong_t, so that wxVariant can be converted to native 64-bit integer types on the same terms as it is converted to other numeric types (useful in e.g. template functions)
No real changes in makefile but avoid repetitious in bakefile.
Collect all preprocessor options needed for Scintilla compilation in
wxscintilla_cppflags template and use for both Scintilla compilation itself
and for the wx libraries using it.
The order of flags in the makefiles has changed but they are still the same
except for Borland makefile which now includes Borland-specific warning
suppression option everywhere it's needed and not just in multilib targets.
Remove asserts in wxMSW::wxTLW::SetIcons() and always set some icon.
In practice having the icons of the exact size for all versions of Windows is
not always possible, there are just too many of them. So set the icon of the
most suitable size if no exact match is found instead of asserting in this
case.
Revert the change of r44514 and do hide the empty sizers. Code relying on them
being shown/positioned should use wxRESERVE_SPACE_EVEN_IF_HIDDEN flag but
assuming it by default results in completely unexpected layouts, e.g. still
using margins around a sizer with hidden window if it contains an empty
sub-sizer.
Postpone showing the notebook pages under wxOSX/Cocoa.
Showing the selected notebook page immediately when it's selected can result
in the top level parent of the notebook being shown prematurely, so don't do
this until the notebook itself is shown.
Remove hard limit on number of pages in wxHtmlPrintout.
This seems to be a leftover from an old version in which the page breaks
positions were stored in a fixed size array. As the code uses a dynamic array
now there doesn't seem to be any reason to impose any limit on the number of
pages and some people did run into the old 999 pages limitation apparently.
Remove selection showing code from the grid sample.
This code is broken as it doesn't always show the selection correctly and
doesn't handle rows-or-columns selection mode at all. Until we can fix it
properly it's better to not have it at all so that at least people avoid
copying the wrong code into their own programs.
Implement wxAuiDefaultTabArt::Clone() using its copy ctor.
Compiler-generated copy ctor works just fine for this class, there is really
no reason to reimplement it, especially wrongly (as it loses many and even
most of the fields), in Clone().
Ensure that wxAuiNotebook::SetArtProvider() always does set it.
It used to only set the provider if the height of the tabs defined by the new
provider was different from the one used by the old one, otherwise the call
was optimized away. Fix this by explicitly setting the art provider for all
tabs in SetArtProvider() itself if UpdateTabCtrlHeight() didn't do it.
Propagate wxHtmlWindow layout direction to the wxDC it uses.
While wxHtmlWindow doesn't support mixing LTR and RTL contents we can indeed
try to make it render pure RTL stuff correctly by setting up the wxDC used for
drawing accordingly.
Allow wxAUI to change the toolbar orientation depending on where is it docked.
It is also now possible to specify wxAUI_TB_VERTICAL or HORIZONTAL to force
the toolbar to be always oriented in the given sense and to prevent it from
being docked at the sides incompatible with it.
Don't assert in wxDataViewCtrl::ItemDeleted() if item doesn't exist.
It seems that it might be valid to delete the items that the GUI control
doesn't know anything about, e.g. this could happen when deleting a child of a
collapsed node in a tree model. So remove the asserts which were triggered in
this case as there doesn't seem to be any way to avoid them with the current
code.
Store the result of wxWindow::NewControlId() in wxWindowIDRef.
The result of calling NewControlId() must be assigned to wxWindowIDRef to be
accounted for correctly, otherwise the id was marked as free while a reference
to it still existed resulting in asserts in id management code when we
attempted to reuse it.
Allow passing multi-line strings to wxDC::DrawText(), even under MSW.
Native wxMSW wxDC::DrawText() implementation doesn't support multi-line
strings so use the generic wxDC::DrawLabel() code instead. Drawing multi-line
strings now works at least in wxGTK and wxMSW, to be tested for the other
platforms.
Avoid using Cygwin sockets as our code assumes that we use WinSock API under
Windows currently (this might change in the future) by defining
__USE_W32_SOCKETS.
Use new, safer and more efficient cygwin_conv_path() function.
Use t_str() instead of fn_str() with Windows API taking file names, under
Cygwin they are different and using fn_str() is incorrect.
Added wxFONTENCODING_EUC_KR alias for wxFONTENCODING_CP949.
Although CP949 might not be exactly the same as EUC-KR it appears to be
similar enough and having a more familiar name for it is helpful for people
unfamiliar with Windows nomenclature.
Define colours for all wxSYS_COLOUR_XXX values in wxUniv.
Ensure that we have enough elements in the array used by
wxSystemSettings::GetColour() in wxUniv to avoid the assert which happened
when e.g. wxSYS_COLOUR_LISTBOXTEXT was requested from it. This resulted in
an infinite stream of asserts and a crash when trying to use wxTreeCtrl in
wxUniv.
Fix harmless unused parameter warnings in wxDEBUG_LEVEL==0 build.
These warnings were harmless as they concerned the parameters used inside
wxASSERTs only but there were hundreds if not thousands of them in
wx/strvararg.h alone so all the rest of build output was completely lost in
them.
Make --disable-debug[_flag] configure option really work.
We never defined wxDEBUG_LEVEL as 0 meaning that debugging code in wxWidgets
was always enabled, even if --disable-debug_flag or --disable-debug (which
implies it) was given.
Fix this now by adding -DwxDEBUG_LEVEL=0 to CPPFLAGS if necessary.
Add wxItemContainer::DetachClientObject() and use it in wxRearrangeList.
Add a method to detach the item from an item control without deleting it and
use it in wxRearrangeList to correctly swap object client data without
deleting the pointers in the process.
LPARAM is a 64 bit type in Win64 and doesn't match the size expected by "%l"
printf format specifier. Instead of showing it as a 32 bit number in 32 bit
build and 64 bit in 64 bits, just truncate it to the lower 32 bits in any case
for now, this should be enough for the diagnostic messages.
Ensure that validators work even in presence of pushed event handlers.
Call pre-processing hooks for each of the handlers in the chain and not only
the first one. This ensures that a validator (which is invoked during the
pre-processing stage) of a window is used even if a window has an event
handler pushed on top of it.
Don't reuse the same event object for multiple events in wxGTK.
The old code simply called SetEventType() to change the type of the event and
called HandleWindowEvent() again with it. This was incorrect as the event was
modified after being processed the first time, notably its WasProcessed() flag
was set and so wxApp::FilterEvent() wasn't called when it was being processed
the second time. In practice this meant that FilterEvent() was never called
for wxEVT_CHAR events -- for which it's nevertheless very useful to have as it
allows to implement application-wide keyboard processing.
Also refactor the code to avoid duplication, exactly the same event sending
code was used in gtk_window_key_press_callback() and gtk_wxwindow_commit_cb().
Extract it now in a private SendCharHookAndCharEvents() function.
Add scripts to make releases from a git-svn repository.
This can't replace the official release script yet as not everybody uses git
but they are much more convenient to use than the old ones for me and also
faster so I'm adding them to svn in case they can be useful to others.
Remove dllexport declaration from a nested struct.
Try a blind fix for VC6 linking problems in DLL build related to
wxFileTypeInfo ctor. This is unlikely to fix it but DLL-exporting a nested
struct which, moreover, has only inline methods, seems unnecessary and it just
might help too.
Don't use wxRendererNative::DrawFocusRect() under Mac.
This function doesn't do the right thing there, it draws the focus border as
it's drawn around controls such as buttons. This border overflows the item
rectangle and results in garbage remaining on screen when selection changes.
Use correct format specifiers in wxOSX/Carbon font caching code.
The specifiers used didn't match the actual argument types resulting in the
asserts from the new wxPrintf() code. Correct them to match the real types.
Generate key events in generic wxDataViewCtrl implementation.
Forward wxEVT_CHAR events from wxDataViewMainWindow to the parent window so
that they could be processed at wxDataViewCtrl level.
Call DisableKeyboardScrolling() to ensure that cursor movement keys are not
always eaten by the parent window but can be used for the navigation in the
control if they're not processed by user.
Add a test keyboard handler to the dataview sample to check that handling keys
in wxDataViewCtrl does work.