Improve "shaped" sample documentation

Also link to it from the functions shown in this sample.
This commit is contained in:
Vadim Zeitlin
2022-03-25 01:54:11 +01:00
parent fffe5af903
commit 80a056a58b
3 changed files with 12 additions and 3 deletions

View File

@@ -690,10 +690,14 @@ utility under macOS).
@section page_samples_shaped Shaped Window Sample
@sampleabout{how to implement a shaped or transparent window\, and a window showing/hiding with effect}
@sampleabout{Showing unusual, e.g. shaped or semi-transparent windows}
This sample shows windows with non-rectangular shapes and non-opaque windows as
well as how the windows can be shown with a special effect.
@see wxTopLevelWindow::SetShape(), wxTopLevelWindow::SetTransparent(),
wxWindow::ShowWithEffect(), wxWindow::HideWithEffect()
wxWindow::ShowWithEffect(), wxWindow::HideWithEffect(),
wxWindow::SetBackgroundStyle()
@sampledir{shaped}

View File

@@ -589,6 +589,9 @@ public:
shown the first time it's called (but it can be called again after
showing the window too).
See @ref page_samples_shaped "the shaped sample" for an example of
using this function.
@param alpha
Determines how opaque or transparent the window will be, if the
platform supports the operation. A value of 0 sets the window to be

View File

@@ -2395,7 +2395,9 @@ public:
Under wxGTK and wxOSX, you can use ::wxBG_STYLE_TRANSPARENT to obtain
full transparency of the window background. Note that wxGTK supports
this only since GTK 2.12 with a compositing manager enabled, call
IsTransparentBackgroundSupported() to check whether this is the case.
IsTransparentBackgroundSupported() to check whether this is the case,
see the example of doing it in @ref page_samples_shaped "the shaped
sample".
Also, in order for @c SetBackgroundStyle(wxBG_STYLE_TRANSPARENT) to
work, it must be called before Create(). If you're using your own