Commit Graph

63 Commits

Author SHA1 Message Date
Vadim Zeitlin
81e1f78b7f Recognize wxStyledTextCtrl in XRC in the schema
This should have been part of e2aca9cbd5 (Add wxStyledTextCtrl XRC
handler, 2021-09-22).

(cherry picked from commit e12f00247730a03d30c548b939322b50e22d625b)
2022-08-18 21:56:11 +02:00
Vadim Zeitlin
0ea43a2592 Recognize "msw" as a valid platform in XRC
This should have been done in 8293dcedef (Factor out platform detection
from XRC code into wxPlatformId, 2021-02-02) which added "msw" as an
alternative to "win".

(cherry picked from commit 39dfcb95e0c7d8130061b07b3bd3e3df5413d261)
2022-08-18 21:55:16 +02:00
Randalphwa
09b2488577 Add support for empty call size to wxGridBagSizer XRC handler
Add empty_cellsize property.

Closes #22541.
2022-06-20 00:36:47 +02:00
Randalphwa
a0bdcc0d0f Support additional wxWizard properties in XRC
Add support for border, bitmap placement, minimum width and background.

Closes #22539.
2022-06-20 00:35:32 +02:00
Randalphwa
385547a946 Add support for SetArtProvider in wxAuiNotebook XRC handler
Allow selecting between the "default" and "simple" providers for now, we
might want to extend this to allow user-defined providers in the future.

Closes #22515.
2022-06-16 12:59:58 +01:00
Randalphwa
cb8c0dfb0d Add undetermined state to wxCheckBoxXmlHandler
3-state checkboxes can have their initial value set to checked
or undetermined -- this adds support for the undetermined
state to the handler (only allowed if the style includes wxCHK_3STATE).

Closes #22468.
2022-06-01 16:55:31 +02:00
Randalphwa
080b0f65cb Fix wxCommandLinkButton alphabetical position
The alphabetical order for this handler was wrong, affecting not
only it's placement in the main HTML page, but also the list of
handlers on the right side.

This commit is best viewed with git --color-moved option.

Closes #22478.
2022-06-01 15:51:53 +02:00
Randalphwa
addbc940c0 Update wxCommandLinkButtonXmlHandler
Adds missing bitmap specifications, removes unusable button styles.

Closes #22475.
2022-06-01 15:47:03 +02:00
Randalphwa
8f735c695b Support more styles, bitmaps, margins in wxToggleButtonXmlHandler
Add missing styles, bitmaps, and margin property.

Closes #22474.
2022-05-30 23:54:47 +02:00
Randalphwa
6ce81acda8 Add digits property to wxSpinCtrlDoubleXmlHandler
This makes it possible to set the precision of the number
without changing the increment amount.

Closes #22470.
2022-05-30 17:53:43 +02:00
Randalphwa
d9f36adc8f Minor fixes to wxRichTextCtrlXmlHandler code and docs
Fix the example showing how to use it in the docs.

Don't use "maxlength" property for this control, as it's ignored by it
anyhow.

Closes #22467.
2022-05-30 17:52:14 +02:00
Randalphwa
76d1b3c9a9 Extend wxBitmap XRC handler to support all button attributes
Add support for the missing wxBU_NOTEXT style, bitmaps for the other
than default states (pressed, focus, disabled and current) and margins
to wxBitmapXmlHandler.

Note that the images for the other states were previously already
supported by wxBitmapButton XRC handler, but not by the wxBitmap one,
even though both bitmap classes support them.

Closes #22451.
2022-05-25 15:33:31 +02:00
oneeyeman1
995c6e6df5 Add wxSpinCtrl::SetIncrement() and implement it for all ports
SetIncrement() was already available in wxSpinCtrlDouble and GTK version
of wxSpinCtrl, now implement support for it in wxMSW and wxOSX as well.

In fact, in wxMSW, implement it at wxSpinButton level, so that both this
class and wxSpinCtrl inheriting from it (in wxMSW only) support setting
custom increment now.

Also add support for it to XRC, show it in the sample and add a unit
test verifying that it works.

Closes #2597.
2022-02-04 02:16:06 +01:00
Alexander Koshelev
df1504dd8f XRC: add GetBitmapBundle function
The function creates wxBitmapBundle from <bitmaps> xrc tag.

Co-authored-by: VZ <vz-github@zeitlins.org>
2022-01-24 17:26:42 +03:00
Vadim Zeitlin
2064526e3d Revert "Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets"
This reverts commit a34ab31453, reversing
changes made to 783df59e66.

Undo the addition of wxBitmapBundle support to XRC, as it is finally
going to be done in a different way soon -- but for now just remove it
to ensure that nobody starts using it before it's finalized.

See #2633.

Closes #22014.
2022-01-16 23:40:31 +01:00
Alexander Koshelev
3907657995 XRC: ability to create wxToolBar with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
4b3233e493 XRC: ability to create wxCommandLinkButton with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
7a13979f5a XRC: ability to create wxButton with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
96f5258df5 XRC: ability to create wxStaticBitmap with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
612c37f706 XRC: add GetBitmapBundle function
The function creates wxBitmapBundle from <bitmaps> xrc tag.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2022-01-11 17:04:27 +03:00
Alexander Koshelev
0cd898975c Allow to add extra accelerators to wxMenuItem
These accelerators are not shown in wxMenuItem label, but still will
work.

Implement support for them in all major ports and XRC.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-11-16 17:26:39 +01:00
Vadim Zeitlin
712c2d4004 Add possibility to create "Close" bitmap button from XRC
This requires refactoring NewCloseButton() in order to extract
CreateCloseButton() from it, as XRC relies on being able to use two-step
creation which was previously impossible for this kind of buttons.

CreateCloseButton() is rather unusual, as it has to be declared in the
derived, platform-specific class, in order to be able to call its
Create(), but is defined only once in common, platform-independent,
code. However the only alternative seems to be to have a static
function, e.g. InitCloseButton(), which wouldn't be very pretty neither.

Closes https://github.com/wxWidgets/wxWidgets/pull/2118
2020-11-19 15:44:54 +01:00
Vadim Zeitlin
b92d194ac4 Add "default" and "bitmap" to wxCommandLinkButton XRC handler
Support the same buttons as in wxButton, as they also make sense here.

Closes https://github.com/wxWidgets/wxWidgets/pull/2116
2020-11-19 15:43:01 +01:00
Vadim Zeitlin
9bc6c3c234 Add support for wxDatePickerCtrl::SetNullText() to XRC
Recognize null-text element.
2020-11-05 14:22:05 +01:00
Vadim Zeitlin
9e2434d013 Document wxGenericAnimationCtrl XRC handler and it to XRC schema
It's actually the same handler as for wxAnimationCtrl, but it still
needs to be mentioned in the XRC format description and recognized by
its schema.
2020-06-10 00:02:34 +02:00
Vadim Zeitlin
a9fda9bfa8 Recognize wxFIXED_MINSIZE in sizer flags in the XRC schema
This seems to have been an accidental omission.
2020-04-26 23:37:02 +02:00
Ilya Sinitsyn
7f91481294 Add XRC handler for wxInfoBar
Update the schema and the sample to show it in action.

Closes https://github.com/wxWidgets/wxWidgets/pull/1564
2019-09-27 12:57:01 +02:00
Anton Triest
584e2715eb Add XRC handlers for wxDataViewCtrl and related classes
The same handler is also used for wxDataViewListCtrl and
wxDataViewTreeCtrl.

Closes #18424.
2019-06-27 12:39:53 +02:00
Vadim Zeitlin
f085981601 Add strikethrough support for fonts defined in XRC
Handle this attribute as well as "underlined" for completeness.
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
ca164bb4ca Support fractional font sizes and numeric weights in XRC
Change the code to handle them, the XRC sample to test them, the schema
to accept them and the documentation to describe them.
2018-09-17 15:24:42 +02:00
Bryan Petty
f4b0ae0370 Update docs.wxwidgets.org links to HTTPS. 2018-09-02 15:35:48 -06:00
Stefan Csomor
4580cdb9ad
Extending wxFont API & OSX Core Text Implementation (#877)
* Switch to pure Core Text Implementation, Start extended Font API

* mac fixes

* First msw implementation

* Fixing paste error

* fixing typo

* Rearranging lines to former fallthrough order

* Blind fixes for covering new abstract methods

* Blind gtk implementations

* Fixing according to travis ..

* Removing method defined in base

* formatting adaptions

* Extending the schema definition for new weights

* fixing typo, using wxRound, other fixes according to comments

* changes according to suggestions

* fixing init order, before the init of m_info was overridden by Init()

* redo

* redo

* redo

* Cleanup

Removing obsolete code snippets, proper traces for font names

* Moving common code

Only the Get/SetNumericWeight calls should now be implemented in the native part, the ‚old‘ Get/SetWeight are common code and use the numeric counterparts.

* Updating docs

* commit wa missing changes.txt

* Doc fixes

* Full stops added
2018-09-01 19:42:18 +02:00
Vadim Zeitlin
cf966718e6 Add "hint" property support to XRC for wxComboBox too
It supports hints, as any/most wxTextEntry-derived classes.
2018-07-10 14:38:29 +02:00
Vadim Zeitlin
b6fde56e2e Allow "hint" property for wxSearchCtrl in the XRC schema
This should have been part of 652b4eb8ed
2018-07-10 14:37:31 +02:00
Vadim Zeitlin
ff1fe53d66 Merge branch 'statbox-any-label'
Add support for using any wxWindow (and not just the equivalent of
wxStaticText) as wxStaticBox label.

See https://github.com/wxWidgets/wxWidgets/pull/650
2018-01-23 15:45:46 +01:00
Vadim Zeitlin
9981a0216f Add "windowlabel" element of wxStaticBoxSizer to the schema
This was forgotten in the commit updating the sizer XRC handler.
2018-01-23 15:45:05 +01:00
Vadim Zeitlin
3357d46ccc Make it simpler to use mnemonics for wxRadioBox items in XRC
Allow specifying label="1" attribute in wxRadioBox <item> tags to
indicate that the usual translation of "_" to "&" should be done, as for
all the other labels.

This is still not the default behaviour to avoid breaking any existing
XRC files using "_", even though using labels="1" by default would make
more sense.
2018-01-11 01:19:16 +01:00
Trylz
80f4c8cde3 Add XRC handler for wxSpinCtrlDouble
Create wxSpinCtrlDoubleXmlHandler class similar to the existing
wxSpinCtrlXmlHandler and update the XRC schema to account for it.
2018-01-10 17:44:32 +01:00
tm
7ce3693956 Add support for bitmaps to wxToggleButton XRC handler
Handle "bitmap" and "bitmapposition" attributes in wxToggleButton XRC handler,
just as it's already done for wxBitmap and wxBitmapToggleButton.

Closes #17850.
2017-05-28 16:05:38 +02:00
Vadim Zeitlin
0d73253111 Support proportions for wxFlexGridSizer growables in XRC schema
The value of "growablerows" and "growablecols" elements is not just a
list of numbers, but a list of numbers with optional weights, specified
after a colon.

Update the XRC schema to account for the weights too.

Closes #17802.
2017-02-19 15:47:01 +01:00
Vadim Zeitlin
f68c67aa85 Use "pair of ints" type for wxGridBagSizer size and position in XRC
Introduce a new type for XRC values imaginatively called just "pair of
integers" which can be used for values not expressed in pixels and hence for
which it doesn't make sense to use dialog units nor to scale them by the DPI.

Use this new type for wxGridBagSizer position and span elements to prevent
them from being changed when using higher than normal DPI.

Closes #17592.
2016-07-06 18:44:07 +02:00
Vadim Zeitlin
379024d94a Add wxAuiManager and wxAuiPaneInfo to the XRC schema
See #13520.
2016-03-09 01:11:21 +01:00
Vadim Zeitlin
60c2b96aef Add support for "forceupper" attribute to wxTextCtrl in XRC
Call ForceUpper() if this attribute is specified.

Currently this is done only for wxTextCtrl but could be extended to wxComboBox
later too if necessary.
2015-12-08 03:02:49 +01:00
Bogdan Iordanescu
b2c3ad614f Add support for hiding sizer items in XRC
Handle the `<hideitems>` property for sizers and document it.

Also group `minsize` together with `hideitems` in `stdSizerProperties`, which
is used by all sizer classes except `wxStdDialogButtonSizer` in the XRC
schema.
2015-09-24 14:48:11 +02:00
Vadim Zeitlin
86f94d431e Correct error messages for wrong wxBoxSizer flags in the schema.
"horizontal" and "vertical" were reversed, making things more confusing
instead of more clear.
2015-04-17 18:29:00 +02:00
Vadim Zeitlin
e44df8e12f Improve sizer flags validation in the XRC schema.
Validate flags for 1D horizontal and vertical sizers and grid sizers
separately to allow checking for invalid flag combinations.

Also try to make the regex patterns used in the schema itself and the error
messages generated when matching them fails slightly more readable.
2015-04-08 23:36:32 +02:00
Vadim Zeitlin
ca42b4a686 Correct example of using custom classes in XRC schema comments.
Include the required namespaces declarations.

Also fix a syntax error in the example (s/,/&/) and show an example attribute
definition.
2015-04-07 14:42:15 +02: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
5f9bd3678f Add XRC handler for wxSimplebook.
Similar to wxNotebook but even simpler as wxSimplebook doesn't use images.

Also add wxSimplebook::Create() as the version inherited from wxBookCtrlBase
didn't _quite_ work: we need to add wxBK_TOP style to prevent asserts due to
unknown alignment in the base class when creating wxSimplebook.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-05 22:01:52 +00:00
Václav Slavík
964352934e Add window variant support to XRC.
Fixes #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:10:24 +00:00