Class Drawer
Namespace: FastReport.Olap.Styling
Assembly: FastCube.Mono.dll
Base class of cube drawer. Contains conversion methods between FastReport's UIStyle to various enums.
public abstract class Drawer
Inheritance
Derived
Constructors
Drawer()
Creates a new instance.
protected Drawer()
Fields
BackgroundColor
Background color.
protected Color BackgroundColor
Field Value
DefaultCellBackground
Default cell background color.
protected Color DefaultCellBackground
Field Value
DefaultCellBorder
Default cell border color.
protected Color DefaultCellBorder
Field Value
DefaultCellText
Default cell text color.
protected Color DefaultCellText
Field Value
ExpandBorderColor
Expand border color.
protected Color ExpandBorderColor
Field Value
ExpandLineColor
Expand line color.
protected Color ExpandLineColor
Field Value
ItemButtonThemeSpacing
Spacing size of item button.
public static readonly Size ItemButtonThemeSpacing
Field Value
SelectedCellBackground
Selected cell background color.
protected Color SelectedCellBackground
Field Value
SortIndicatorColor
Sort indicator color.
protected Color SortIndicatorColor
Field Value
SplitterColor
Splitter color.
protected Color SplitterColor
Field Value
TreeButtonSize
Size of tree button.
public static readonly Size TreeButtonSize
Field Value
axisCellSpacing
Spacing of axis cell.
protected static readonly int axisCellSpacing
Field Value
dropPolygonSize
Size of drop polygon.
protected Size dropPolygonSize
Field Value
fuelPolygonSize
Size of fuel polygon.
protected Size fuelPolygonSize
Field Value
itemButtonMinTextRect
Minimal size of item button text.
protected static readonly int itemButtonMinTextRect
Field Value
sortPolygonSize
Size of sort polygon.
protected Size sortPolygonSize
Field Value
sortSize
Size of sort.
protected int sortSize
Field Value
style
Current style.
protected UIStyle style
Field Value
Properties
UIStyle
Gets or sets current user interface style.
public virtual UIStyle UIStyle { get; set; }
Property Value
UIStyleName
Gets or sets user interface style name.
public virtual string UIStyleName { get; set; }
Property Value
UIStyleNames
Gets available user interface style names.
public virtual string[] UIStyleNames { get; }
Property Value
string[]
Methods
AlignmentToFlags(Alignment)
Convertes alignment to text format flags.
protected TextFormatFlags AlignmentToFlags(Alignment alignment)
Parameters
alignment
Alignment
Returns
CheckStateToWindowsForms(CheckState)
Convertes checkstate enum to windows froms enum.
public static CheckState CheckStateToWindowsForms(CheckState state)
Parameters
state
CheckState
Returns
CreateLinearGradientBrush(Rectangle, Color, Color, LinearGradientMode)
Creates a new linear gradient brush.
public static LinearGradientBrush CreateLinearGradientBrush(Rectangle r, Color color1, Color color2, LinearGradientMode mode)
Parameters
color1
Color
color2
Color
mode
LinearGradientMode
Returns
DrawAxisCell(Graphics, Font, bool, Rectangle, string, PropertyOfCellAxis, Alignment, DrawerState, Style, bool, out Point, out Point, ImageList, int, bool)
Draws axis cell.
public virtual void DrawAxisCell(Graphics g, Font f, bool isColumns, Rectangle r, string text, PropertyOfCellAxis cellProperties, Alignment alignment, DrawerState state, Style style, bool isSelected, out Point treeButtonLocation, out Point hierButtonLocation, ImageList images, int imageIndex, bool showEllipsis)
Parameters
g
Graphics
f
Font
isColumns
bool
text
string
cellProperties
PropertyOfCellAxis
alignment
Alignment
state
DrawerState
style
Style
isSelected
bool
treeButtonLocation
Point
hierButtonLocation
Point
images
ImageList
imageIndex
int
showEllipsis
bool
DrawChevron(Graphics, Rectangle, Color, Scrollers)
Draws chevron.
protected void DrawChevron(Graphics g, Rectangle r, Color color, Scrollers scroll)
Parameters
g
Graphics
color
Color
scroll
Scrollers
DrawColHeaderBg(Graphics, Rectangle, DrawerState, bool)
Draws column header background.
protected virtual void DrawColHeaderBg(Graphics g, Rectangle r, DrawerState State, bool IsSelected)
Parameters
g
Graphics
State
DrawerState
IsSelected
bool
DrawColHeaderCell(Graphics, Font, Rectangle, string, DrawerState, bool, ItemOptions, SortDirection)
Draws column header cell.
public virtual void DrawColHeaderCell(Graphics g, Font f, Rectangle r, string text, DrawerState State, bool IsSelected, ItemOptions options, SortDirection sortDirection)
Parameters
g
Graphics
f
Font
text
string
State
DrawerState
IsSelected
bool
options
ItemOptions
sortDirection
SortDirection
DrawConnector(Graphics, Point, Point)
Draws connector.
public void DrawConnector(Graphics g, Point start, Point end)
Parameters
g
Graphics
start
Point
end
Point
DrawDataCell(Graphics, Font, Rectangle, string, CellState, DrawerState, Alignment, ImageList, int, Style, HighlightDrawHandler, object)
Draws data cell.
public virtual void DrawDataCell(Graphics g, Font f, Rectangle r, string text, CellState cs, DrawerState ds, Alignment alignment = Alignment.Left, ImageList images = null, int imageIndex = -1, Style style = null, HighlightDrawHandler highlightDraw = null, object data = null)
Parameters
g
Graphics
f
Font
text
string
cs
CellState
ds
DrawerState
alignment
Alignment
images
ImageList
imageIndex
int
style
Style
highlightDraw
HighlightDrawHandler
data
object
DrawDropDownButton(Graphics, Rectangle, ItemOptions, SortDirection, DrawerState)
Draws dropdown button.
public virtual void DrawDropDownButton(Graphics g, Rectangle r, ItemOptions options, SortDirection sortDirection, DrawerState state)
Parameters
g
Graphics
options
ItemOptions
sortDirection
SortDirection
state
DrawerState
DrawDropDownButtonBackground(Graphics, Rectangle, DrawerState)
Draws dropdown button background.
protected virtual void DrawDropDownButtonBackground(Graphics g, Rectangle r, DrawerState state)
Parameters
g
Graphics
state
DrawerState
DrawDropIndicator(Graphics, Rectangle)
Draws drop indicator.
public virtual void DrawDropIndicator(Graphics g, Rectangle r)
Parameters
g
Graphics
DrawExpandButton(Graphics, Rectangle, bool, bool)
Draws expand button.
public virtual void DrawExpandButton(Graphics g, Rectangle r, bool Expanded, bool IsMouseOver)
Parameters
g
Graphics
Expanded
bool
IsMouseOver
bool
DrawGradient(Graphics, Rectangle, Color, Color, GradientType)
Draws the gradient.
public static void DrawGradient(Graphics g, Rectangle r, Color c1, Color c2, GradientType gradientType)
Parameters
g
Graphics
c1
Color
c2
Color
gradientType
GradientType
DrawGridBody(Graphics, Rectangle)
Draws grid body.
public virtual void DrawGridBody(Graphics g, Rectangle r)
Parameters
g
Graphics
DrawImageCell(Graphics, Rectangle, DrawerState)
Draws image cell.
public virtual void DrawImageCell(Graphics g, Rectangle r, DrawerState State)
Parameters
g
Graphics
State
DrawerState
DrawItemButton(Graphics, Font, Rectangle, string, ImageList, int, ItemOptions, SortDirection, DrawerState)
Draws item button.
public virtual void DrawItemButton(Graphics g, Font f, Rectangle r, string text, ImageList images, int imageIndex, ItemOptions options, SortDirection sortDirection, DrawerState state)
Parameters
g
Graphics
f
Font
text
string
images
ImageList
imageIndex
int
options
ItemOptions
sortDirection
SortDirection
state
DrawerState
DrawItemButtonBackground(Graphics, Rectangle, DrawerState)
Draws item button background.
protected virtual void DrawItemButtonBackground(Graphics g, Rectangle r, DrawerState state)
Parameters
g
Graphics
state
DrawerState
DrawRowHeaderBg(Graphics, Rectangle, DrawerState, bool)
Draws row header background.
protected virtual void DrawRowHeaderBg(Graphics g, Rectangle r, DrawerState State, bool IsSelected)
Parameters
g
Graphics
State
DrawerState
IsSelected
bool
DrawRowHeaderCell(Graphics, Font, Rectangle, string, DrawerState, bool)
Draws row header cell.
public virtual void DrawRowHeaderCell(Graphics g, Font f, Rectangle r, string Text, DrawerState State, bool IsSelected)
Parameters
g
Graphics
f
Font
Text
string
State
DrawerState
IsSelected
bool
DrawRowIndicator(Graphics, Rectangle)
Draws row indicator.
public void DrawRowIndicator(Graphics g, Rectangle r)
Parameters
g
Graphics
DrawScroll(Graphics, Rectangle, DrawerState, Scrollers)
Draws scroll.
public virtual void DrawScroll(Graphics g, Rectangle r, DrawerState state, Scrollers scroll)
Parameters
g
Graphics
state
DrawerState
scroll
Scrollers
DrawSelText(Graphics, Font, Rectangle, string, TextFormatFlags, int, int, int)
Draws selected text.
public void DrawSelText(Graphics g, Font f, Rectangle r, string Text, TextFormatFlags flags, int spacing, int selStart, int selLength)
Parameters
g
Graphics
f
Font
Text
string
flags
TextFormatFlags
spacing
int
selStart
int
selLength
int
DrawSizingLine(Graphics, Point, Point)
Draws sizing line.
public void DrawSizingLine(Graphics g, Point Start, Point Stop)
Parameters
g
Graphics
Start
Point
Stop
Point
DrawSort(Graphics, Point, SortDirection)
Draws sort.
protected virtual void DrawSort(Graphics g, Point pt, SortDirection sortDirection)
Parameters
g
Graphics
pt
Point
sortDirection
SortDirection
DrawStyleBackground(Graphics, Rectangle, Style)
Draws style background.
public static void DrawStyleBackground(Graphics g, Rectangle r, Style style)
Parameters
g
Graphics
style
Style
DrawStyleBorder(Graphics, Rectangle, Style)
Draws style border.
public static void DrawStyleBorder(Graphics g, Rectangle r, Style style)
Parameters
g
Graphics
style
Style
DrawStyleText(Graphics, Rectangle, Style, string, TextFormatFlags)
Draws style text.
public static void DrawStyleText(Graphics g, Rectangle r, Style style, string text, TextFormatFlags flags)
Parameters
g
Graphics
style
Style
text
string
flags
TextFormatFlags
DrawText(Graphics, Font, Color, Rectangle, string, TextFormatFlags)
Draws text.
public static void DrawText(Graphics g, Font f, Color textColor, Rectangle r, string text, TextFormatFlags flags)
Parameters
g
Graphics
f
Font
textColor
Color
text
string
flags
TextFormatFlags
DrawerStateToButtonState(DrawerState)
Returns button state based on drawer state.
public static ButtonState DrawerStateToButtonState(DrawerState state)
Parameters
state
DrawerState
Returns
GetButtonTextColor(DrawerState)
Get button text color based on state.
public virtual Color GetButtonTextColor(DrawerState state)
Parameters
state
DrawerState
Returns
GetCheckBoxState(CheckState, DrawerState)
Gets checkbox state based on cube state.
protected CheckBoxState GetCheckBoxState(CheckState checkState, DrawerState state)
Parameters
checkState
CheckState
state
DrawerState
Returns
GetConnectorPen()
Gets a new pen for connector.
protected Pen GetConnectorPen()
Returns
GetControlColor()
Gets control color.
public virtual Color GetControlColor()
Returns
GetDropPolygon(Rectangle)
Gets drop polygon.
protected Point[] GetDropPolygon(Rectangle r)
Parameters
Returns
Point[]
GetExpandBorderPen(bool, bool)
Gets a new pen for border.
public Pen GetExpandBorderPen(bool Expanded, bool IsMouseOver)
Parameters
Expanded
bool
IsMouseOver
bool
Returns
GetExpandBrush(Rectangle)
Gets a new brush.
public virtual Brush GetExpandBrush(Rectangle r)
Parameters
Returns
GetExpandPen(bool, bool)
Gets a new pen.
public Pen GetExpandPen(bool Expanded, bool IsMouseOver)
Parameters
Expanded
bool
IsMouseOver
bool
Returns
GetFuelPolygon(Rectangle)
Gets fuel polygon.
protected Point[] GetFuelPolygon(Rectangle r)
Parameters
Returns
Point[]
GetHeaderElement(DrawerState)
Gets header element based on cube state.
protected VisualStyleElement GetHeaderElement(DrawerState State)
Parameters
State
DrawerState
Returns
GetHeaderTextColor(bool)
Gets header text color based on seleceted.
public virtual Color GetHeaderTextColor(bool Selected)
Parameters
Selected
bool
Returns
GetItemButtonDropRect(Rectangle, ItemOptions)
Gets drop rect of item button.
public Rectangle GetItemButtonDropRect(Rectangle r, ItemOptions options)
Parameters
options
ItemOptions
Returns
GetPushButtonState(DrawerState)
Gets push button state based on cube state.
protected PushButtonState GetPushButtonState(DrawerState state)
Parameters
state
DrawerState
Returns
GetRadioButtonState(CheckState, DrawerState)
Gets radiobutton state based on cube state.
protected RadioButtonState GetRadioButtonState(CheckState checkState, DrawerState state)
Parameters
checkState
CheckState
state
DrawerState
Returns
GetScrollerSize()
Gets scroller size.
public Size GetScrollerSize()
Returns
GetSortPolygon(Rectangle, SortDirection)
Gets sort polygon.
protected Point[] GetSortPolygon(Rectangle r, SortDirection sortDirection)
Parameters
sortDirection
SortDirection
Returns
Point[]
GetSplitterPen()
Gets a new pen for splitter.
public Pen GetSplitterPen()
Returns
HasSpaceForTreeButton(Rectangle)
Returns information that rectangle has enough space for tree button.
protected bool HasSpaceForTreeButton(Rectangle r)
Parameters
Returns
MeasureAxisCell(Font, Size, string, PropertyOfCellAxis, Alignment, DrawerState, bool, ImageList, int)
Calculates size for axis cell.
public Size MeasureAxisCell(Font f, Size sz, string text, PropertyOfCellAxis cellProperties, Alignment alignment, DrawerState state, bool groupInHeight, ImageList images, int imageIndex)
Parameters
f
Font
sz
Size
text
string
cellProperties
PropertyOfCellAxis
alignment
Alignment
state
DrawerState
groupInHeight
bool
images
ImageList
imageIndex
int
Returns
PaintCheckBox(Graphics, Rectangle, CheckState, bool, DrawerState)
Paints check box.
public virtual void PaintCheckBox(Graphics g, Rectangle r, CheckState checkState, bool IsRadio, DrawerState state)
Parameters
g
Graphics
checkState
CheckState
IsRadio
bool
state
DrawerState
PaintHighlight(Graphics, Rectangle, bool)
Paints hightlight.
public virtual void PaintHighlight(Graphics g, Rectangle r, bool IsActive)
Parameters
g
Graphics
IsActive
bool
PaintHighlight(Graphics, Rectangle, GraphicsPath, Brush, Pen)
Paints highlight.
protected void PaintHighlight(Graphics g, Rectangle r, GraphicsPath path, Brush brush, Pen pen)
Parameters
g
Graphics
path
GraphicsPath
brush
Brush
pen
Pen
SetControlStyle(Control)
Sets style in the control.
public virtual void SetControlStyle(Control control)
Parameters
control
Control