[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/ -> TThemeManager.php (sommaire)

TThemeManager class

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TThemeManager.php 1536 2006-12-01 19:51:21Z xue $
Poids: 437 lignes (13 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

TThemeManager:: (7 méthodes):
  init()
  getTheme()
  getAvailableThemes()
  getBasePath()
  setBasePath()
  getBaseUrl()
  setBaseUrl()

TTheme:: (7 méthodes):
  __construct()
  getName()
  getBaseUrl()
  getBasePath()
  applySkin()
  getStyleSheetFiles()
  getJavaScriptFiles()


Classe: TThemeManager  - X-Ref

TThemeManager class

TThemeManager manages the themes used in a Prado application.

Themes are stored under the directory specified by the
{@link setBasePath BasePath} property. The themes can be accessed
via URL {@link setBaseUrl BaseUrl}. Each theme is represented by a subdirectory
and all the files under that directory. The name of a theme is the name
of the corresponding subdirectory.
By default, the base path of all themes is a directory named "themes"
under the directory containing the application entry script.
To get a theme (normally you do not need to), call {@link getTheme}.

TThemeManager may be configured within page service tag in application
configuration file as follows,
<module id="themes" class="System.Web.UI.TThemeManager"
BasePath="Application.themes" BaseUrl="/themes" />
where {@link getCacheExpire CacheExpire}, {@link getCacheControl CacheControl}
and {@link getBufferOutput BufferOutput} are configurable properties of THttpResponse.

init($config)   X-Ref
Initializes the module.
This method is required by IModule and is invoked by application.

param: TXmlElement module configuration

getTheme($name)   X-Ref

param: string name of the theme to be retrieved
return: TTheme the theme retrieved

getAvailableThemes()   X-Ref

return: array list of available theme names

getBasePath()   X-Ref

return: string the base path for all themes. It is returned as an absolute path.

setBasePath($value)   X-Ref

param: string the base path for all themes. It must be in the format of a namespace.

getBaseUrl()   X-Ref

return: string the base URL for all themes.

setBaseUrl($value)   X-Ref

param: string the base URL for all themes.

Classe: TTheme  - X-Ref

TTheme class

TTheme represents a particular theme. It is merely a collection of skins
that are applicable to the corresponding controls.

Each theme is stored as a directory and files under that directory.
The theme name is the directory name. When TTheme is created, the files
whose name has the extension ".skin" are parsed and saved as controls skins.

A skin is essentially a list of initial property values that are to be applied
to a control when the skin is applied.
Each type of control can have multiple skins identified by the SkinID.
If a skin does not have SkinID, it is the default skin that will be applied
to controls that do not specify particular SkinID.

Whenever possible, TTheme will try to make use of available cache to save
the parsing time.

To apply a theme to a particular control, call {@link applySkin}.

__construct($themePath,$themeUrl)   X-Ref
Constructor.

param: string theme path
param: string theme URL

getName()   X-Ref

return: string theme name

getBaseUrl()   X-Ref

return: string the URL to the theme folder (without ending slash)

getBasePath()   X-Ref

return: string the file path to the theme folder

applySkin($control)   X-Ref
Applies the theme to a particular control.
The control's class name and SkinID value will be used to
identify which skin to be applied. If the control's SkinID is empty,
the default skin will be applied.

param: TControl the control to be applied with a skin
return: boolean if a skin is successfully applied

getStyleSheetFiles()   X-Ref

return: array list of CSS files (URL) in the theme

getJavaScriptFiles()   X-Ref

return: array list of Javascript files (URL) in the theme



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7