Table of Contents

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

objectDrawer

Derived

MonoDrawer

Constructors

Drawer()

Creates a new instance.

protected Drawer()

Fields

BackgroundColor

Background color.

protected Color BackgroundColor

Field Value

Color

DefaultCellBackground

Default cell background color.

protected Color DefaultCellBackground

Field Value

Color

DefaultCellBorder

Default cell border color.

protected Color DefaultCellBorder

Field Value

Color

DefaultCellText

Default cell text color.

protected Color DefaultCellText

Field Value

Color

ExpandBorderColor

Expand border color.

protected Color ExpandBorderColor

Field Value

Color

ExpandLineColor

Expand line color.

protected Color ExpandLineColor

Field Value

Color

ItemButtonThemeSpacing

Spacing size of item button.

public static readonly Size ItemButtonThemeSpacing

Field Value

Size

SelectedCellBackground

Selected cell background color.

protected Color SelectedCellBackground

Field Value

Color

SortIndicatorColor

Sort indicator color.

protected Color SortIndicatorColor

Field Value

Color

SplitterColor

Splitter color.

protected Color SplitterColor

Field Value

Color

TreeButtonSize

Size of tree button.

public static readonly Size TreeButtonSize

Field Value

Size

axisCellSpacing

Spacing of axis cell.

protected static readonly int axisCellSpacing

Field Value

int

dropPolygonSize

Size of drop polygon.

protected Size dropPolygonSize

Field Value

Size

fuelPolygonSize

Size of fuel polygon.

protected Size fuelPolygonSize

Field Value

Size

itemButtonMinTextRect

Minimal size of item button text.

protected static readonly int itemButtonMinTextRect

Field Value

int

sortPolygonSize

Size of sort polygon.

protected Size sortPolygonSize

Field Value

Size

sortSize

Size of sort.

protected int sortSize

Field Value

int

style

Current style.

protected UIStyle style

Field Value

UIStyle

Properties

UIStyle

Gets or sets current user interface style.

public virtual UIStyle UIStyle { get; set; }

Property Value

UIStyle

UIStyleName

Gets or sets user interface style name.

public virtual string UIStyleName { get; set; }

Property Value

string

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

TextFormatFlags

CheckStateToWindowsForms(CheckState)

Convertes checkstate enum to windows froms enum.

public static CheckState CheckStateToWindowsForms(CheckState state)

Parameters

state CheckState

Returns

CheckState

CreateLinearGradientBrush(Rectangle, Color, Color, LinearGradientMode)

Creates a new linear gradient brush.

public static LinearGradientBrush CreateLinearGradientBrush(Rectangle r, Color color1, Color color2, LinearGradientMode mode)

Parameters

r Rectangle

color1 Color

color2 Color

mode LinearGradientMode

Returns

LinearGradientBrush

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

r Rectangle

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

r Rectangle

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

r Rectangle

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

r Rectangle

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

r Rectangle

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

r Rectangle

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

r Rectangle

state DrawerState

DrawDropIndicator(Graphics, Rectangle)

Draws drop indicator.

public virtual void DrawDropIndicator(Graphics g, Rectangle r)

Parameters

g Graphics

r Rectangle

DrawExpandButton(Graphics, Rectangle, bool, bool)

Draws expand button.

public virtual void DrawExpandButton(Graphics g, Rectangle r, bool Expanded, bool IsMouseOver)

Parameters

g Graphics

r Rectangle

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

r Rectangle

c1 Color

c2 Color

gradientType GradientType

DrawGridBody(Graphics, Rectangle)

Draws grid body.

public virtual void DrawGridBody(Graphics g, Rectangle r)

Parameters

g Graphics

r Rectangle

DrawImageCell(Graphics, Rectangle, DrawerState)

Draws image cell.

public virtual void DrawImageCell(Graphics g, Rectangle r, DrawerState State)

Parameters

g Graphics

r Rectangle

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

r Rectangle

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

r Rectangle

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

r Rectangle

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

r Rectangle

Text string

State DrawerState

IsSelected bool

DrawRowIndicator(Graphics, Rectangle)

Draws row indicator.

public void DrawRowIndicator(Graphics g, Rectangle r)

Parameters

g Graphics

r Rectangle

DrawScroll(Graphics, Rectangle, DrawerState, Scrollers)

Draws scroll.

public virtual void DrawScroll(Graphics g, Rectangle r, DrawerState state, Scrollers scroll)

Parameters

g Graphics

r Rectangle

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

r Rectangle

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

r Rectangle

style Style

DrawStyleBorder(Graphics, Rectangle, Style)

Draws style border.

public static void DrawStyleBorder(Graphics g, Rectangle r, Style style)

Parameters

g Graphics

r Rectangle

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

r Rectangle

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

r Rectangle

text string

flags TextFormatFlags

DrawerStateToButtonState(DrawerState)

Returns button state based on drawer state.

public static ButtonState DrawerStateToButtonState(DrawerState state)

Parameters

state DrawerState

Returns

ButtonState

GetButtonTextColor(DrawerState)

Get button text color based on state.

public virtual Color GetButtonTextColor(DrawerState state)

Parameters

state DrawerState

Returns

Color

GetCheckBoxState(CheckState, DrawerState)

Gets checkbox state based on cube state.

protected CheckBoxState GetCheckBoxState(CheckState checkState, DrawerState state)

Parameters

checkState CheckState

state DrawerState

Returns

CheckBoxState

GetConnectorPen()

Gets a new pen for connector.

protected Pen GetConnectorPen()

Returns

Pen

GetControlColor()

Gets control color.

public virtual Color GetControlColor()

Returns

Color

GetDropPolygon(Rectangle)

Gets drop polygon.

protected Point[] GetDropPolygon(Rectangle r)

Parameters

r Rectangle

Returns

Point[]

GetExpandBorderPen(bool, bool)

Gets a new pen for border.

public Pen GetExpandBorderPen(bool Expanded, bool IsMouseOver)

Parameters

Expanded bool

IsMouseOver bool

Returns

Pen

GetExpandBrush(Rectangle)

Gets a new brush.

public virtual Brush GetExpandBrush(Rectangle r)

Parameters

r Rectangle

Returns

Brush

GetExpandPen(bool, bool)

Gets a new pen.

public Pen GetExpandPen(bool Expanded, bool IsMouseOver)

Parameters

Expanded bool

IsMouseOver bool

Returns

Pen

GetFuelPolygon(Rectangle)

Gets fuel polygon.

protected Point[] GetFuelPolygon(Rectangle r)

Parameters

r Rectangle

Returns

Point[]

GetHeaderElement(DrawerState)

Gets header element based on cube state.

protected VisualStyleElement GetHeaderElement(DrawerState State)

Parameters

State DrawerState

Returns

VisualStyleElement

GetHeaderTextColor(bool)

Gets header text color based on seleceted.

public virtual Color GetHeaderTextColor(bool Selected)

Parameters

Selected bool

Returns

Color

GetItemButtonDropRect(Rectangle, ItemOptions)

Gets drop rect of item button.

public Rectangle GetItemButtonDropRect(Rectangle r, ItemOptions options)

Parameters

r Rectangle

options ItemOptions

Returns

Rectangle

GetPushButtonState(DrawerState)

Gets push button state based on cube state.

protected PushButtonState GetPushButtonState(DrawerState state)

Parameters

state DrawerState

Returns

PushButtonState

GetRadioButtonState(CheckState, DrawerState)

Gets radiobutton state based on cube state.

protected RadioButtonState GetRadioButtonState(CheckState checkState, DrawerState state)

Parameters

checkState CheckState

state DrawerState

Returns

RadioButtonState

GetScrollerSize()

Gets scroller size.

public Size GetScrollerSize()

Returns

Size

GetSortPolygon(Rectangle, SortDirection)

Gets sort polygon.

protected Point[] GetSortPolygon(Rectangle r, SortDirection sortDirection)

Parameters

r Rectangle

sortDirection SortDirection

Returns

Point[]

GetSplitterPen()

Gets a new pen for splitter.

public Pen GetSplitterPen()

Returns

Pen

HasSpaceForTreeButton(Rectangle)

Returns information that rectangle has enough space for tree button.

protected bool HasSpaceForTreeButton(Rectangle r)

Parameters

r Rectangle

Returns

bool

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

Size

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

r Rectangle

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

r Rectangle

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

r Rectangle

path GraphicsPath

brush Brush

pen Pen

SetControlStyle(Control)

Sets style in the control.

public virtual void SetControlStyle(Control control)

Parameters

control Control