NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
AdvStringCellRenderer Class Reference

This class represents an extension to the usual cell string renderer to provide functionalities to highlight the cursor position and automatically update the surrounding frame. More...

#include <cellattributes.hpp>

Inheritance diagram for AdvStringCellRenderer:
Collaboration diagram for AdvStringCellRenderer:

Public Member Functions

 AdvStringCellRenderer (const CellValueShader shader=CellValueShader())
 
virtual void Draw (wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, const wxRect &rect, int row, int col, bool isSelected)
 
virtual wxGridCellRenderer * Clone () const
 

Protected Member Functions

bool isHeadLine (const wxGrid &grid, int row)
 
bool isFrame (const wxGrid &grid, int row, int col)
 
bool isPartOfCursor (const wxGrid &grid, int row, int col)
 
bool hasCustomColor ()
 
wxGridCellAttr * createHighlightedAttr (const wxGridCellAttr &attr, const wxGrid &grid, int row, int col)
 
wxGridCellAttr * createFrameAttr (const wxGridCellAttr &attr)
 
wxGridCellAttr * createHeadlineAttr (const wxGridCellAttr &attr)
 
wxGridCellAttr * createCustomColorAttr (const wxGridCellAttr &attr, const wxGrid &grid, int row, int col)
 

Protected Attributes

CellValueShader m_shader
 

Detailed Description

This class represents an extension to the usual cell string renderer to provide functionalities to highlight the cursor position and automatically update the surrounding frame.

Definition at line 54 of file cellattributes.hpp.

Constructor & Destructor Documentation

◆ AdvStringCellRenderer()

AdvStringCellRenderer::AdvStringCellRenderer ( const CellValueShader  shader = CellValueShader())
inline

Definition at line 155 of file cellattributes.hpp.

Referenced by Clone().

Member Function Documentation

◆ Clone()

virtual wxGridCellRenderer * AdvStringCellRenderer::Clone ( ) const
inlinevirtual

Reimplemented in AdvBooleanCellRenderer.

Definition at line 192 of file cellattributes.hpp.

References AdvStringCellRenderer(), and m_shader.

Here is the call graph for this function:

◆ createCustomColorAttr()

wxGridCellAttr * AdvStringCellRenderer::createCustomColorAttr ( const wxGridCellAttr &  attr,
const wxGrid &  grid,
int  row,
int  col 
)
inlineprotected

Definition at line 128 of file cellattributes.hpp.

References calculateLuminosity(), CellValueShader::getColour(), and m_shader.

Referenced by createHighlightedAttr(), Draw(), and AdvBooleanCellRenderer::Draw().

Here is the call graph for this function:

◆ createFrameAttr()

wxGridCellAttr * AdvStringCellRenderer::createFrameAttr ( const wxGridCellAttr &  attr)
inlineprotected

Definition at line 112 of file cellattributes.hpp.

References FrameColor.

Referenced by Draw(), and AdvBooleanCellRenderer::Draw().

◆ createHeadlineAttr()

wxGridCellAttr * AdvStringCellRenderer::createHeadlineAttr ( const wxGridCellAttr &  attr)
inlineprotected

Definition at line 119 of file cellattributes.hpp.

References HeadlineColor.

Referenced by Draw().

◆ createHighlightedAttr()

wxGridCellAttr * AdvStringCellRenderer::createHighlightedAttr ( const wxGridCellAttr &  attr,
const wxGrid &  grid,
int  row,
int  col 
)
inlineprotected

Definition at line 80 of file cellattributes.hpp.

References calculateLuminosity(), createCustomColorAttr(), hasCustomColor(), HighlightColor, HighlightHeadlineColor, isHeadLine(), and min.

Referenced by Draw(), and AdvBooleanCellRenderer::Draw().

Here is the call graph for this function:

◆ Draw()

virtual void AdvStringCellRenderer::Draw ( wxGrid &  grid,
wxGridCellAttr &  attr,
wxDC &  dc,
const wxRect &  rect,
int  row,
int  col,
bool  isSelected 
)
inlinevirtual

Reimplemented in AdvBooleanCellRenderer.

Definition at line 157 of file cellattributes.hpp.

References createCustomColorAttr(), createFrameAttr(), createHeadlineAttr(), createHighlightedAttr(), hasCustomColor(), isFrame(), isHeadLine(), and isPartOfCursor().

Referenced by AdvBooleanCellRenderer::Draw().

Here is the call graph for this function:

◆ hasCustomColor()

bool AdvStringCellRenderer::hasCustomColor ( )
inlineprotected

Definition at line 75 of file cellattributes.hpp.

References CellValueShader::isActive(), and m_shader.

Referenced by createHighlightedAttr(), Draw(), and AdvBooleanCellRenderer::Draw().

Here is the call graph for this function:

◆ isFrame()

bool AdvStringCellRenderer::isFrame ( const wxGrid &  grid,
int  row,
int  col 
)
inlineprotected

Definition at line 64 of file cellattributes.hpp.

Referenced by Draw(), AdvBooleanCellRenderer::Draw(), and isPartOfCursor().

◆ isHeadLine()

bool AdvStringCellRenderer::isHeadLine ( const wxGrid &  grid,
int  row 
)
inlineprotected

Definition at line 59 of file cellattributes.hpp.

Referenced by createHighlightedAttr(), Draw(), and AdvBooleanCellRenderer::Draw().

◆ isPartOfCursor()

bool AdvStringCellRenderer::isPartOfCursor ( const wxGrid &  grid,
int  row,
int  col 
)
inlineprotected

Definition at line 69 of file cellattributes.hpp.

References isFrame().

Referenced by Draw(), and AdvBooleanCellRenderer::Draw().

Here is the call graph for this function:

Member Data Documentation

◆ m_shader

CellValueShader AdvStringCellRenderer::m_shader
protected

The documentation for this class was generated from the following file: