API of wxAnimationCtrlBase practically forces the derived classes to
have such method, so just add it and make GetAnimation() a simple
non-virtual accessor.
Simplify and streamline animation classes relationship: wxAnimation is
the only public class representing an animation and it can be created by
both the native wxAnimationCtrl and wxGenericAnimationCtrl using the new
public CreateAnimation() method.
Replace wxAnimationImplType enum with more flexible type info based
check.
This is just unnecessary and having wxAnimation::m_refData->m_refData is
confusing, both in wxGTK version where it's not used and in the generic
one where it is, but can be replaced by more type-safe m_decoder.
When font family of a private font is retrieved with call to
Gdiplus::Font::GetFamily() then later on there is thrown access violation
exception when array of cached private font families (filled in by
Gdiplus::PrivateFontCollection::GetFamilies()) is deleted in
wxGDIPlusRenderer::Unload(). Call to Font::GetFamily() is done in
wxGDIPlusContext::GetTextExtent() so this issue can be seen once text
extent is retrieved for a private font.
Because it looks that calling to Font::GetFamily() for a private font is
messing up something in the array of cached private font families so
we should avoid calling this method and directly fetch corresponding font
family from the cache instead.
Reference to the cached font family would be stored in
the wxGDIPlusDataFont and it could be fetched from there directly instead
of making a call to Font::GetFamily().
Closes#18704.
Add menu item to switch to the generic version when using the sample on
a platform where a native version is available (i.e. wxGTK) in order to
allow testing it there easily.
This allows to easily test for the native control existence and also
whether wxGenericAnimationCtrl is really different from wxAnimationCtrl.
It also allows to avoid explicit check for wxGTK in common code.
They're the same thing, and we still keep WXDLLIMPEXP_ADV in the
existing code, but as this line was just moved to a new place, update it
to use the more appropriate DLL export declaration too.
No real changes.
Switch from using just "bool expandSelection" in the grid functions
(possibly) extending the current selection to using the full
wxKeyboardState.
This allows to pass it to ExtendOrCreateCurrentBlock() and slightly
simplify the code by using DoMoveCursorFromKeyboard().
Don't try to extend the existing selected blocks to rows/columns, this
contradicts the documented behaviour which is to discard the selected
blocks that become invalid in the new mode.
Do handle switching to wxGridSelectRowsOrColumns mode, as there doesn't
seem to be any reason not to.
Update the tests to check for the expected selection update behaviour.
Change the return type of this function to a simple and clear bool
instead of 3-valued int requiring a special explanation. This is simpler
and not any less efficient as checking for whether one block contains
another or the other one contains this one are separate operations
anyhow.
Rename the function to a more grammatically correct name.
Also move it inline as it's now trivial enough for this to be worth it.
This class was a strange hybrid of a container/view/range and iterator,
as it both provided begin()/end() container-like methods and
iterator-like methods for dereferencing/advancing.
Simplify this by removing the latter part and making this class really
just a range, with its own iterator class in order to avoid leaking the
exact type of the iterator used in the API.
Note that while it's now completely trivial, it is still useful as it
isolates the application code from the vector used to store the selected
blocks currently and will allow to change internal representation in the
future without breaking the existing code.
Really edit the current selection block instead of storing the temporary
information about the current selection and applying it on releasing Shift
key or LKM.
VZ: [...] this is not used by wxGrid itself and SendEvent() is not part
of the public API, so we never made any promises about being able to call
it with wxEVT_GRID_RANGE_SELECT.
Store all types of selection with an array of blocks instead of arrays of
cells, blocks, rows and columns.
It (hopefully) simplifies the code and allows us to implement editing of
the last selection block much easier.
Line height calculation based on the font size is not right for wxGTK3
because native buttons (used as in-line editor buttons) don't scale down
well and they are not displayed properly within the line.
Minimal button size when the label is displayed properly is 35 so this
has to be minimal line height under wxGTK3.
Closes#18715.
For the sake of consistency with editor buttons created with
wxPropertyGrid::GenerateEditorButton(), the borders around the buttons
should be taken into account while positioning the buttons
in wxPGMultiButton.