1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. module:: wx.lib.agw.advancedsplash
.. currentmodule:: wx.lib.agw.advancedsplash
.. highlight:: python
.. _wx.lib.agw.advancedsplash:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.advancedsplash**
==========================================================================================================================================
:class:`~wx.lib.agw.advancedsplash.AdvancedSplash` tries to reproduce the behavior of :class:`~adv.SplashScreen`, with
some enhancements.
Description
===========
:class:`AdvancedSplash` tries to reproduce the behavior of :class:`~adv.SplashScreen`, but with
some enhancements (in my opinion).
:class:`AdvancedSplash` starts its construction from a simple frame. Then, depending on
the options passed to it, it sets the frame shape accordingly to the image passed
as input. :class:`AdvancedSplash` behaves somewhat like :class:`~adv.SplashScreen`, and almost
all the methods available in :class:`~adv.SplashScreen` are available also in
this module.
Usage
=====
Sample usage::
import wx
import wx.lib.agw.advancedsplash as AS
app = wx.App(0)
frame = wx.Frame(None, -1, "AdvancedSplash Test")
imagePath = "my_splash_image.png"
bitmap = wx.Bitmap(imagePath, wx.BITMAP_TYPE_PNG)
shadow = wx.WHITE
splash = AS.AdvancedSplash(frame, bitmap=bitmap, timeout=5000,
agwStyle=AS.AS_TIMEOUT |
AS.AS_CENTER_ON_PARENT |
AS.AS_SHADOW_BITMAP,
shadowcolour=shadow)
app.MainLoop()
None of the options are strictly required (a part of the `bitmap` parameter).
If you use the defaults you get a very simple :class:`AdvancedSplash`.
Methods and Settings
====================
:class:`AdvancedSplash` is customizable, and in particular you can set:
- Whether you want to mask a colour or not in your input bitmap;
- Where to center the splash screen (on screen, on parent or nowhere);
- Whether it is a "timeout" splashscreen or not;
- The time after which :class:`AdvancedSplash` is destroyed (if it is a timeout splashscreen);
- The (optional) text you wish to display;
- The font, colour and position of the displayed text (optional).
Window Styles
=============
This class supports the following window styles:
======================= =========== ==================================================
Window Styles Hex Value Description
======================= =========== ==================================================
``AS_TIMEOUT`` 0x1 :class:`AdvancedSplash` will be destroyed after `timeout` milliseconds.
``AS_NOTIMEOUT`` 0x2 :class:`AdvancedSplash` can be destroyed by clicking on it, pressing a key or by explicitly call the `Close()` method.
``AS_CENTER_ON_SCREEN`` 0x4 :class:`AdvancedSplash` will be centered on screen.
``AS_CENTER_ON_PARENT`` 0x8 :class:`AdvancedSplash` will be centered on parent.
``AS_NO_CENTER`` 0x10 :class:`AdvancedSplash` will not be centered.
``AS_SHADOW_BITMAP`` 0x20 If the bitmap you pass as input has no transparency, you can choose one colour that will be masked in your bitmap. the final shape of :class:`AdvancedSplash` will be defined only by non-transparent (non-masked) pixels.
======================= =========== ==================================================
Events Processing
=================
`No custom events are available for this class.`
License And Version
===================
:class:`AdvancedSplash` control is distributed under the wxPython license.
Latest revision: Andrea Gavana @ 19 Dec 2012, 21.00 GMT
Version 0.5
|class_summary| Classes Summary
===============================
================================================================================ ================================================================================
:ref:`~wx.lib.agw.advancedsplash.AdvancedSplash` :class:`AdvancedSplash` tries to reproduce the behavior of :class:`~adv.SplashScreen`, with
================================================================================ ================================================================================
|
.. toctree::
:maxdepth: 1
:hidden:
wx.lib.agw.advancedsplash.AdvancedSplash
|