C# Class XPTable.Themes.ThemeManager

A class that contains methods for drawing Windows XP themed Control parts
Exibir arquivo Open project: binaryage/xrefresh

Public Methods

Method Description
DrawButton ( Graphics g, Rectangle buttonRect, ComboBoxStates state ) : void
DrawButton ( Graphics g, Rectangle buttonRect, PushButtonStates state ) : void

Draws a push button in the specified state, on the specified graphics surface, and within the specified bounds

DrawButton ( Graphics g, Rectangle buttonRect, Rectangle clipRect, PushButtonStates state ) : void

Draws a push button in the specified state, on the specified graphics surface, and within the specified bounds

DrawCheck ( Graphics g, Rectangle checkRect, CheckBoxStates state ) : void

Draws a check box in the specified state, on the specified graphics surface, and within the specified bounds

DrawCheck ( Graphics g, Rectangle checkRect, Rectangle clipRect, CheckBoxStates state ) : void

Draws a check box in the specified state, on the specified graphics surface, and within the specified bounds

DrawColumnHeader ( Graphics g, Rectangle headerRect, ColumnHeaderStates state ) : void

Draws a column header in the specified state, on the specified graphics surface, and within the specified bounds

DrawColumnHeader ( Graphics g, Rectangle headerRect, Rectangle clipRect, ColumnHeaderStates state ) : void

Draws a column header in the specified state, on the specified graphics surface, and within the specified bounds

DrawComboBoxButton ( Graphics g, Rectangle buttonRect, ComboBoxStates state ) : void

Draws a combobox button in the specified state, on the specified graphics surface, and within the specified bounds

DrawComboBoxButton ( Graphics g, Rectangle buttonRect, Rectangle clipRect, ComboBoxStates state ) : void

Draws a combobox button in the specified state, on the specified graphics surface, and within the specified bounds

DrawProgressBar ( Graphics g, Rectangle drawRect ) : void

Draws a ProgressBar on the specified graphics surface, and within the specified bounds

DrawProgressBar ( Graphics g, Rectangle drawRect, Rectangle clipRect ) : void

Draws a ProgressBar on the specified graphics surface, and within the specified bounds

DrawProgressBarChunks ( Graphics g, Rectangle drawRect ) : void

Draws the ProgressBar's chunks on the specified graphics surface, and within the specified bounds

DrawProgressBarChunks ( Graphics g, Rectangle drawRect, Rectangle clipRect ) : void

Draws the ProgressBar's chunks on the specified graphics surface, and within the specified bounds

DrawRadioButton ( Graphics g, Rectangle checkRect, RadioButtonStates state ) : void

Draws a RadioButton in the specified state, on the specified graphics surface, and within the specified bounds

DrawRadioButton ( Graphics g, Rectangle checkRect, Rectangle clipRect, RadioButtonStates state ) : void

Draws a RadioButton in the specified state, on the specified graphics surface, and within the specified bounds

DrawTextBox ( Graphics g, Rectangle textRect, Rectangle clipRect, TextBoxStates state ) : void

Draws a TextBox in the specified state, on the specified graphics surface, and within the specified bounds

DrawTextBox ( Graphics g, Rectangle textRect, TextBoxStates state ) : void

Draws a TextBox in the specified state, on the specified graphics surface, and within the specified bounds

DrawThemeBackground ( Graphics g, string windowClass, int part, int partState, Rectangle drawRect ) : void

Draws the background image defined by the visual style for the specified control part

DrawThemeBackground ( Graphics g, string windowClass, int part, int partState, Rectangle drawRect, Rectangle clipRect ) : void

Draws the background image defined by the visual style for the specified control part

DrawUpDownButtons ( Graphics g, Rectangle upButtonRect, Rectangle upButtonClipRect, UpDownStates upButtonState, Rectangle downButtonRect, Rectangle downButtonClipRect, UpDownStates downButtonState ) : void

Draws an UpDown's up and down buttons in the specified state, on the specified graphics surface, and within the specified bounds

DrawUpDownButtons ( Graphics g, Rectangle upButtonRect, UpDownStates upButtonState, Rectangle downButtonRect, UpDownStates downButtonState ) : void

Draws an UpDown's up and down buttons in the specified state, on the specified graphics surface, and within the specified bounds

Protected Methods

Method Description
ThemeManager ( ) : System

Initializes a new instance of the ThemeManager class with default settings

Private Methods

Method Description
ConvertCheckBoxStateToButtonState ( CheckBoxStates state ) : ButtonState

Converts the specified CheckBoxStates value to a ButtonState value

ConvertComboBoxStateToButtonState ( ComboBoxStates state ) : ButtonState

Converts the specified ComboBoxStates value to a ButtonState value

ConvertPushButtonStateToButtonState ( PushButtonStates state ) : ButtonState

Converts the specified PushButtonStates value to a ButtonState value

ConvertRadioButtonStateToButtonState ( RadioButtonStates state ) : ButtonState

Converts the specified RadioButtonStates value to a ButtonState value

ConvertUpDownStateToButtonState ( UpDownStates state ) : ButtonState

Converts the specified UpDownStates value to a ButtonState value

DrawTabPageBody ( Graphics g, Rectangle tabRect ) : void

Draws a TabPage body on the specified graphics surface, and within the specified bounds

DrawTabPageBody ( Graphics g, Rectangle tabRect, Rectangle clipRect ) : void

Draws a TabPage body on the specified graphics surface, and within the specified bounds

GetComctlVersion ( ) : System.Version

Returns a Version object that contains information about the verion of the CommonControls that the application is using

IsMixed ( CheckBoxStates state ) : bool

Returns whether the specified CheckBoxStates value is in an indeterminate state

Method Details

DrawButton() public static method

public static DrawButton ( Graphics g, Rectangle buttonRect, ComboBoxStates state ) : void
g System.Drawing.Graphics
buttonRect System.Drawing.Rectangle
state ComboBoxStates
return void

DrawButton() public static method

Draws a push button in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawButton ( Graphics g, Rectangle buttonRect, PushButtonStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
buttonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the button
state PushButtonStates A PushButtonStates value that specifies the /// state to draw the button in
return void

DrawButton() public static method

Draws a push button in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawButton ( Graphics g, Rectangle buttonRect, Rectangle clipRect, PushButtonStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
buttonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the button
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
state PushButtonStates A PushButtonStates value that specifies the /// state to draw the button in
return void

DrawCheck() public static method

Draws a check box in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawCheck ( Graphics g, Rectangle checkRect, CheckBoxStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
checkRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the check box
state CheckBoxStates A CheckBoxStates value that specifies the /// state to draw the check box in
return void

DrawCheck() public static method

Draws a check box in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawCheck ( Graphics g, Rectangle checkRect, Rectangle clipRect, CheckBoxStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
checkRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the check box
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
state CheckBoxStates A CheckBoxStates value that specifies the /// state to draw the check box in
return void

DrawColumnHeader() public static method

Draws a column header in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawColumnHeader ( Graphics g, Rectangle headerRect, ColumnHeaderStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
headerRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the column header
state ColumnHeaderStates A ColumnHeaderStates value that specifies the /// state to draw the column header in
return void

DrawColumnHeader() public static method

Draws a column header in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawColumnHeader ( Graphics g, Rectangle headerRect, Rectangle clipRect, ColumnHeaderStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
headerRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the column header
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
state ColumnHeaderStates A ColumnHeaderStates value that specifies the /// state to draw the column header in
return void

DrawComboBoxButton() public static method

Draws a combobox button in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawComboBoxButton ( Graphics g, Rectangle buttonRect, ComboBoxStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
buttonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the combobox button
state ComboBoxStates A ComboBoxStates value that specifies the /// state to draw the combobox button in
return void

DrawComboBoxButton() public static method

Draws a combobox button in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawComboBoxButton ( Graphics g, Rectangle buttonRect, Rectangle clipRect, ComboBoxStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
buttonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the button
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
state ComboBoxStates A ComboBoxStates value that specifies the /// state to draw the combobox button in
return void

DrawProgressBar() public static method

Draws a ProgressBar on the specified graphics surface, and within the specified bounds
public static DrawProgressBar ( Graphics g, Rectangle drawRect ) : void
g System.Drawing.Graphics The Graphics to draw on
drawRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the ProgressBar
return void

DrawProgressBar() public static method

Draws a ProgressBar on the specified graphics surface, and within the specified bounds
public static DrawProgressBar ( Graphics g, Rectangle drawRect, Rectangle clipRect ) : void
g System.Drawing.Graphics The Graphics to draw on
drawRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the ProgressBar
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
return void

DrawProgressBarChunks() public static method

Draws the ProgressBar's chunks on the specified graphics surface, and within the specified bounds
public static DrawProgressBarChunks ( Graphics g, Rectangle drawRect ) : void
g System.Drawing.Graphics The Graphics to draw on
drawRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the ProgressBar
return void

DrawProgressBarChunks() public static method

Draws the ProgressBar's chunks on the specified graphics surface, and within the specified bounds
public static DrawProgressBarChunks ( Graphics g, Rectangle drawRect, Rectangle clipRect ) : void
g System.Drawing.Graphics The Graphics to draw on
drawRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the ProgressBar
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
return void

DrawRadioButton() public static method

Draws a RadioButton in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawRadioButton ( Graphics g, Rectangle checkRect, RadioButtonStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
checkRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the RadioButton
state RadioButtonStates A RadioButtonStates value that specifies the /// state to draw the RadioButton in
return void

DrawRadioButton() public static method

Draws a RadioButton in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawRadioButton ( Graphics g, Rectangle checkRect, Rectangle clipRect, RadioButtonStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
checkRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the RadioButton
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
state RadioButtonStates A RadioButtonStates value that specifies the /// state to draw the RadioButton in
return void

DrawTextBox() public static method

Draws a TextBox in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawTextBox ( Graphics g, Rectangle textRect, Rectangle clipRect, TextBoxStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
textRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the TextBox
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area
state TextBoxStates A TextBoxStates value that specifies the /// state to draw the TextBox in
return void

DrawTextBox() public static method

Draws a TextBox in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawTextBox ( Graphics g, Rectangle textRect, TextBoxStates state ) : void
g System.Drawing.Graphics The Graphics to draw on
textRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the TextBox
state TextBoxStates A TextBoxStates value that specifies the /// state to draw the TextBox in
return void

DrawThemeBackground() public static method

Draws the background image defined by the visual style for the specified control part
public static DrawThemeBackground ( Graphics g, string windowClass, int part, int partState, Rectangle drawRect ) : void
g System.Drawing.Graphics The Graphics to draw on
windowClass string The class of the part to draw
part int The part to draw
partState int The state of the part to draw
drawRect System.Drawing.Rectangle The Rectangle in which the part is drawn
return void

DrawThemeBackground() public static method

Draws the background image defined by the visual style for the specified control part
public static DrawThemeBackground ( Graphics g, string windowClass, int part, int partState, Rectangle drawRect, Rectangle clipRect ) : void
g System.Drawing.Graphics The Graphics to draw on
windowClass string The class of the part to draw
part int The part to draw
partState int The state of the part to draw
drawRect System.Drawing.Rectangle The Rectangle in which the part is drawn
clipRect System.Drawing.Rectangle The Rectangle that represents the clipping area for the part
return void

DrawUpDownButtons() public static method

Draws an UpDown's up and down buttons in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawUpDownButtons ( Graphics g, Rectangle upButtonRect, Rectangle upButtonClipRect, UpDownStates upButtonState, Rectangle downButtonRect, Rectangle downButtonClipRect, UpDownStates downButtonState ) : void
g System.Drawing.Graphics The Graphics to draw on
upButtonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the up button
upButtonClipRect System.Drawing.Rectangle The Rectangle that represents the clipping area /// for the up button
upButtonState UpDownStates An UpDownStates value that specifies the /// state to draw the up button in
downButtonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the down button
downButtonClipRect System.Drawing.Rectangle The Rectangle that represents the clipping area /// for the down button
downButtonState UpDownStates An UpDownStates value that specifies the /// state to draw the down button in
return void

DrawUpDownButtons() public static method

Draws an UpDown's up and down buttons in the specified state, on the specified graphics surface, and within the specified bounds
public static DrawUpDownButtons ( Graphics g, Rectangle upButtonRect, UpDownStates upButtonState, Rectangle downButtonRect, UpDownStates downButtonState ) : void
g System.Drawing.Graphics The Graphics to draw on
upButtonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the up button
upButtonState UpDownStates An UpDownStates value that specifies the /// state to draw the up button in
downButtonRect System.Drawing.Rectangle The Rectangle that represents the dimensions /// of the down button
downButtonState UpDownStates An UpDownStates value that specifies the /// state to draw the down button in
return void

ThemeManager() protected method

Initializes a new instance of the ThemeManager class with default settings
protected ThemeManager ( ) : System
return System