Commit Graph

16588 Commits

Author SHA1 Message Date
Vadim Zeitlin
f350babf36 Recognize MSVC 14 a.k.a. Visual Studio 2015 compiler.
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).

See #16854.
2015-05-08 02:24:10 +02:00
Vadim Zeitlin
6c7c8b6d8d Use correct format (%zu) for printing size_t values.
Fix assert due to using %d for printing 64 bit size_t values under Win64.

Closes #16974.
2015-04-29 19:38:02 +02:00
Paul Cornett
f0a2a6472f Fix GTK warnings after 4b9485a when TLW is closed while editor is still shown, see #16850 2015-04-26 11:01:44 -07:00
Nick Matthews
d13278ecc3 Add support for DOCTYPE to wxXmlDocument.
Allow retrieving the DOCTYPE specified in an existing document as well as
specifying the DOCTYPE to use when writing a new one.

Closes #13779.
2015-04-26 15:36:48 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
ef96bd6af1 Compilation fix for wxOSX/wxGTK3 after FromDIP() changes.
100d2a5 didn't update the inline FromDIP() version for these ports.
2015-04-23 19:25:21 +02:00
Vadim Zeitlin
af01ef1bb0 Make default wxSizer border DPI-aware.
Scale the (still hard-coded) border in pixels by the content scale factor for
the platforms where this needs to be done, i.e. not wxGTK nor wxOSX where the
underlying toolkit already does it.
2015-04-23 19:18:10 +02:00
Vadim Zeitlin
100d2a5819 Make wxWindow::FromDIP() more flexible and easier to use.
Allow calling this method with either wxSize, wxPoint or just an int.

Also provide a static overload allowing to use it even when no appropriate
wxWindow is available.
2015-04-23 02:20:02 +02:00
Vadim Zeitlin
4df7057302 Refactor: extract XRC code handling conversion from dialog units.
Factor out this code to a reusable ParseValueInPixels() function instead of
repeating it in GetSize() and GetDimension() (and using a hack to reuse it
from GetPosition()).

No real changes, just made some error messages more precise.
2015-04-23 02:20:01 +02:00
Vadim Zeitlin
6d92f45385 Remove all mentions of wxGauge shadow width and bezel face.
The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
2015-04-20 18:46:55 +02:00
Dimitri Schoolwerth
25fcb85590 Fix TreeCtrlTestCase assert failure under Windows.
A '-' keypress doesn't collapse a tree item with the native MSW tree
control. Instead, when not using the generic tree control, simulate a
keypress of WXK_LEFT to collapse the root item . This fixes the assert
checking if the root item is collapsed after the keypress.

Regression since 9d7a7ec556 (which
mistakenly may have had treectrltest.cpp as part of its commit).
2015-04-16 03:13:54 +04:00
Vadim Zeitlin
a5988a0389 Fix invalid use of wxSizer flags inside the library itself.
It doesn't make sense to use wxALIGN_CENTRE_VERTICAL with wxGROW, so remove
the alignment style.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
16c22794b7 Give error messages for invalid sizer flags in XRC wxSizer handler.
This allows to give the exact line number of the error, unlike asserts that
happen in wxSizer code which don't point exactly to the error location when
sizers are created via XRC.

It also has the advantage of allowing to detect wrong use of wxALIGN_LEFT and
wxALIGN_TOP, unlike the asserts which can't do it because the value of both of
these flags is 0.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
233a7fe77b Add wxSizerFlags::Cent{er,re}{Vertical,Horizontal}().
Provide CentreVertical() and CentreHorizontal() methods in wxSizerFlags which
are useful for 2D sizers (for 1D ones just Centre() can be used anyhow).
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
78b98bf00c Validate wxBoxSizer flags instead of silently ignoring invalid combinations.
Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
2015-04-08 23:35:19 +02:00
Dimitri Schoolwerth
66cfa40643 Deal with remaining cvs/svn keywords.
A few $Id$ references remained after commit
3f66f6a5b3 or appeared in newly added files.
Remove the lines containing svn keywords except when it concerns
third-party files. In that case keep the line as-is or collapse it to the
keyword if it had been expanded to contain wx commit information (only
occurs with src/zlib/ChangeLog).
2015-04-09 03:32:23 +04:00
Vadim Zeitlin
5ff775234c Only use native wxAppProgressIndicator in wxOSX/Cocoa port.
It's not implemented for Carbon nor iOS.
2015-04-08 13:02:13 +02:00
Vadim Zeitlin
288f03d86f Also disable wxUSE_ACTIVITYINDICATOR for wxiOS build.
Another attempt to fix the buildbot wxiOS build.
2015-04-07 22:40:56 +02:00
Vadim Zeitlin
72cba11aa2 Forcefully disable wxUSE_ADDREMOVECTRL in wxiOS build.
wxUSE_ADDREMOVECTRL requires wxUSE_BMPBUTTON which is currently not supported
in iOS, so disable it too.
2015-04-07 14:30:23 +02:00
Artur Wieczorek
0bc20fee71 Non-PCH wxPG build fix after cc575a.
Include time.h to get wxMilliClock_t used now instead of wxLongLong for the timestamp.
2015-04-06 23:40:54 +02:00
Artur Wieczorek
830458af2b Non-PCH build fix after d892274.
Include time.h to get wxMilliClock_t used now instead of wxLongLong for the
timestamp.

Closes #16939.
2015-04-06 22:23:43 +02:00
Vadim Zeitlin
8577366bae Add check for wxUSE_ADDREMOVECTRL dependency on wxUSE_BMPBUTTON.
This should, in particular, fix the currently broken wxiOS build as
wxBitmapButton is not available in that port.
2015-04-06 22:15:26 +02:00
Artur Wieczorek
a679d0440c Check for wxUSE_RICHTEXT dependencies in wx/chkconf.h.
wxRichTextCtrl requires wxHTML and wxLongLong, check for the options
consistency.

See #16939.
2015-04-05 20:02:19 +02:00
Artur Wieczorek
93b9126fe5 Check for wxUSE_STC dependency on wxUSE_STOPWATCH.
wxStyledTextCtrl requires wxStopWatch, so check that wxUSE_STOPWATCH is set if
wxUSE_MEDIACTRL is.

See #16939.
2015-04-05 19:59:36 +02:00
Artur Wieczorek
2e26d30bcc Check for wxUSE_MEDIACTRL dependency on wxUSE_LONLONG.
wxMediaCtrl requires wxLongLong, so check that wxUSE_LONLONG is set if
wxUSE_MEDIACTRL is.

See #16939.
2015-04-05 19:59:33 +02:00
Artur Wieczorek
d8922744cf Use wxMilliClock_t to store values returned by wxGetLocalTimeMillis().
This fixes wxComboCtrl compilation with wxUSE_LONGLONG==0 as wxMilliClock_t is
always mapped to the proper base type and hence can be used even if wxLongLong
type is not defined.

See #16939.
2015-04-04 17:51:40 +02:00
Artur Wieczorek
5158ce4944 Add wxPropertyGridInterface::SetPropertyValue setter for native datatypes wxLongLong_t and wxULongLong_t.
And fix typo in wxUSE_LONGLONG macro name.
2015-04-04 00:33:25 +02:00
Artur Wieczorek
7c6943175b Prepare wxPG to build successfully when wxUSE_LONGLONG or wxUSE_DATETIME is disabled.
Make the code ready to build even when wxLongLong and wxDateTime types are not available.
2015-04-03 21:12:54 +02:00
Artur Wieczorek
cc575a7a89 Use in wxPG classes wxMilliClock_t variables to store values returned by wxGetLocalTimeMillis() function.
wxMilliClock_t is always mapped to the proper base type and hence can be used even if wxLongLong type is not defined (when wxUSE_LONGLONG is disabled).
2015-04-03 21:11:15 +02:00
Artur Wieczorek
6a7b95f419 Use predefined constants to represent common wxPG variant types (cont.).
Instead of using individual string literals use globally defined constants representing wxPG variant types (wxLongLong, wxULongLong, wxArrayInt, etc.).
2015-04-03 21:09:12 +02:00
Vadim Zeitlin
ffd2857571 Fix vertical alpha adjustment in wxPixelData<wxImage>::Offset().
Handle "y" parameter correctly when offsetting m_pAlpha, it was just ignored
before, i.e. Offset(x, y) and OffsetY(y) always behaved as if y were 1.
2015-04-01 14:15:11 +02:00
kkrev
2349bce2c4 Add wxTreeListCtrl::EnsureVisible().
Just forward this to the wxDataViewCtrl method with the same name.

Closes #16937.
2015-03-31 21:57:16 +02:00
Artur Wieczorek
5353a00180 Use wxVariant::IsType() function to check the type of variant values in wxPG.
Since there is a dedicated function to check the type of variant then there is not necessary to call wxVariant::GetType() function and perform explicit comparisons of returned strings.
2015-03-29 21:41:52 +02:00
Vadim Zeitlin
94c4d37c82 Disable wxUSE_ACTIVITYINDICATOR for non-MSVC compilers under MSW.
Don't give errors in the default configuration for MinGW makefile builds in
which wxUSE_GRAPHICS_CONTEXT is disabled, but wxUSE_ACTIVITYINDICATOR is
enabled.

Instead, disable wxUSE_ACTIVITYINDICATOR implicitly for them, this is not
ideal but better than broken build.
2015-03-24 13:18:47 +01:00
Artur Wieczorek
ecbfa2c122 Disable wxUSE_ACTIVITYINDICATOR if wxUSE_GRAPHICS_CONTEXT==0.
wxActivityIndicatorImpl requires wxGraphicsContext to compile successfully (it
is used to implement anti-aliased drawing of the control).

Add a check to enforce this.

Closes #16921
2015-03-22 00:56:53 +01:00
Vadim Zeitlin
d2ddb2c7c0 Add XRC handler for wxActivityIndicator control.
The only attribute for this control is a boolean "running" which can be set to
start the indicator on load.

Update the schema, documentation and the XRC sample.
2015-03-20 00:08:38 +01:00
Vadim Zeitlin
3f84cb17ca Add wxActivityIndicator control.
This is a simple animated control indicating some program activity.

Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.

Update the sample and the documentation.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
00748bbaef Add wxWindow::FromDIP() for simpler high DPI support.
This method allows to scale a pixel value by a DPI-dependent factor to the
value used by the underlying toolkit only if necessary, i.e. when not using
GTK+ 3 or OS X which already do this internally.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
bc492a9e6e Make wxWindow::GetContentScaleFactor() useful for non-OSX platforms.
Return the ration of the current DPI to the standard one to allow using this
function to scale pixel values for the current screen resolution.
2015-03-20 00:08:37 +01:00
Artur Wieczorek
fad1ec7ce8 Determine whether a new element is added to the list in wxPGArrayEditorDialog when its editing is started.
New element can be added to the list not only by clicking "New item" button but also by clicking under the last element of the list and we need to determine its index in both cases because it is used later on in wxPGArrayEditorDialog::OnEndLabelEdit event handler.

Closes #16905.
2015-03-18 19:04:29 +01:00
Vadim Zeitlin
4f846f72de Don't attempt using <type_traits> with g++ 4.9.2 in C++98 mode.
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).

Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
2015-03-17 23:55:46 +01:00
Vadim Zeitlin
6b84e6e1b9 Slightly improve out of memory handling in wxMemoryBuffer.
Reset not only m_data but also m_size and m_len to 0 if we run out of memory.

Closes #4500.
2015-03-13 16:58:37 +01:00
Vadim Zeitlin
b8f6cb417c Fix PCH-less build after the last commit.
Add missing wx/log.h inclusion.
2015-03-11 23:53:59 +01:00
Kinaou Hervé
de7e315557 Correct implement wxLIST_AUTOSIZE_XXX in the generic wxListCtrl.
Use both the contents and the header width when wxLIST_AUTOSIZE_USEHEADER is
given instead of just the latter.

Also make both wxLIST_AUTOSIZE_USEHEADER and the previously implemented
wxLIST_AUTOSIZE work efficiently for the virtual list controls by reusing
wxMaxWidthCalculatorBase already used in the generic wxDataViewCtrl.

Closes #10326.
2015-03-11 22:03:14 +01:00
Vadim Zeitlin
fa1c3ecfa6 Factor out wxMaxWidthCalculatorBase from wxDataViewCtrl code.
This will allow reusing it elsewhere, notably in the generic wxListCtrl.

See #10326.
2015-03-11 22:03:14 +01:00
Vadim Zeitlin
fe33cfc83f Add wxProcess::Activate() and implement it for MSW.
When launching child processes it can be convenient to be able to switch to
them later, provide a method in wxProcess to do it.

Currently this is only implemented in wxMSW but could almost certainly be done
for wxOSX too (it can be done using Apple Script, so presumably there is a way
to do it programmatically as well) and could be also made to work at least
under some Unix systems by emulating what wmctrl does (or just launching it?).
2015-03-10 20:31:24 +01:00
Václav Slavík
94fc40b7ea Make semantic wxICON_XXX styles the canonical ones
Make wxICON_WARNING and wxICON_ERROR the primary constants for their
purpose and define their visual Windows-based synonyms wxICON_HAND and
wxICON_EXCLAMATION in terms of the semantic ones, instead of the other
way around.
2015-03-07 16:15:51 +01:00
Vadim Zeitlin
b7388f36f2 Change wxFD_MULTIPLE value to avoid conflict with wxDIALOG_NO_PARENT.
This avoids GTK+ warnings about creating a dialog without parent when a
wxFileDialog with wxFD_MULTIPLE style is created.

Closes #16863.
2015-03-02 14:32:53 +01:00
Bryan Petty
3fb1827c93 Merge pull request #19 from lanurmi/spelling-fix-occurrrrrrrr
Fix spelling of occur* in random files.
2015-02-27 12:06:28 -07:00
Artur Wieczorek
5068dddb17 Remove obsolete comments regarding wxPGEditor::CreateControls.
Constants which are mentioned in the comment are not used since r76882.
2015-02-26 19:29:05 +01:00