The window manager is responsible for updating and applying preference values for all windows.
Only one instance of this class is created. It is accessed through a global reference called "theWindowManager".
Once all the preferences are loaded at startup the setWindowPreferences() method needs to be called with the loaded window preference values.
When a window is created the applyPreferences() method should be called to apply the preference values to the window.
Whenever a window size, position, or state is changed the corresponding setSize(), setPosition(), or setState() method should be called.
Public Member Functions |
|
__init__ () | |
ensureOnScreen () | |
setWindowPreferences () | |
At startup this method must be called so the
WindowManager has access to all the window preferences.
|
|
setMainWindowPreferenceOverride () | |
getWindowPreference () | |
getResolutionPreference () | |
This method gets the previous resolution
stored in the prefs. |
|
getPositionPreference () | |
getSizePreference () | |
applyPreferences () | |
This method applies the preference values
(if there are any) to the given window. |
|
setSize () | |
Set the size preference for a window.
|
|
setPosition () | |
Set the position preference for a window.
|
|
setState () | |
Set the state preference for a window.
|
|
setBgColor () | |
Set the background color preference for a
window. |
|
getDisplaySize () | |
This method is used to get the size of the
screen. |
WindowManager.WindowManager.__init__ | ( | ) |
WindowManager.WindowManager.ensureOnScreen | ( | ) |
WindowManager.WindowManager.setWindowPreferences | ( | ) |
At startup this method must be called so the WindowManager has access to all the window preferences.
WindowManager.WindowManager.setMainWindowPreferenceOverride | ( | ) |
WindowManager.WindowManager.getWindowPreference | ( | ) |
WindowManager.WindowManager.getResolutionPreference | ( | ) |
This method gets the previous resolution stored in the prefs.
WindowManager.WindowManager.getPositionPreference | ( | ) |
WindowManager.WindowManager.getSizePreference | ( | ) |
WindowManager.WindowManager.applyPreferences | ( | ) |
This method applies the preference values (if there are any) to the given window.
WindowManager.WindowManager.setSize | ( | ) |
Set the size preference for a window.
This method should be called whenever the size of a window changes.
WindowManager.WindowManager.setPosition | ( | ) |
Set the position preference for a window.
This method should be called whenever the position of a window changes.
WindowManager.WindowManager.setState | ( | ) |
Set the state preference for a window.
This method should be called whenever the state of a window changes.
WindowManager.WindowManager.setBgColor | ( | ) |
Set the background color preference for a window.
This method should be called whenever the colour of a window changes.
WindowManager.WindowManager.getDisplaySize | ( | ) |
This method is used to get the size of the screen.