Public Types | |
enum | ThreadingMode { DirectCall, MemoryBuffer } |
Threading mode. More... | |
Static Public Member Functions | |
Threading mode | |
static ThreadingMode | GetThreadingMode () |
Gets a current threading mode. | |
static void | SetThreadingMode (ThreadingMode threadingMode) |
Sets a new threading mode. | |
Default appearance | |
static CFont * | GetFont () |
Gets the default font used in grids. | |
static void | SetFont (CFont *font) |
Sets a default font to be used in grids. | |
static CAppearance & | GetDefaultAppearance () |
Gets the default appearance used in grids. | |
static void | SetDefaultAppearance (CAppearance &appearance) |
Sets a new appearance to be used in grids. | |
Default interfaces | |
static ICustomDraw & | GetDefaultCustomDraw () |
Gets a default implementation of ICustomDraw interface. | |
static ILinePaintFormat & | GetDefaultLinePaintFormat () |
Gets a default implementation of ILinePaintFormat interface. | |
static ICellPaintFormat & | GetDefaultCellPaintFormat () |
Gets a default implementation of ICellPaintFormat interface. | |
static IHeaderPaintFormat & | GetDefaultHeaderPaintFormat () |
Gets a default implementation of IHeaderPaintFormat interface. | |
static IColumnPaintFormat & | GetDefaultColumnPaintFormat () |
Gets a default implementation of IColumnPaintFormat interface. | |
static IDragDrop & | GetDefaultDragDrop () |
Gets a default implementation of IDragDrop interface. | |
static ICopyPaste & | GetDefaultCopyPaste () |
Gets a default implementation of ICopyPaste interface. | |
static IEditInPlace & | GetDefaultEditInPlace () |
Gets a default implementation of IEditInPlace interface. | |
static IKeyManager & | GetDefaultKeyManager () |
Gets a default implementation of IKeyManager interface. | |
static ITooltipCtrl * | CreateDefaultTooltipCtrl () |
Gets a default implementation of ITooltipCtrl interface for tooltips. | |
static ITooltipCtrl * | CreateDefaultInPlaceTooltipCtrl () |
Gets a default implementation of ITooltipCtrl interface for 'in place' tooltips. |
enum ThreadingMode |
Threading mode.
The grid is thread safe. Data updating is conducted in an asynchronous way by calling PostMessage without blocking a calling thread. I.e. UpdateRow(), UpdateItem(), UpdateDataObject() functions and coming from Common::CDataObject::ISink interface notifications don't cause the blockage of the calling thread while the messages are being processed in the grid. That's why data can be changed in any thread and notifications can be sent to the grid without preliminary synchronization with the GUI thread.
In all other functions (data inserting, deleting ...) when they are called from a thread different from the GUI thread synchronization is conducted by sending SendMessage blocking by the calling thread for the period of its processing. In order to be used in the applications making very strict demands to multithread safety the grid realizes two mechanisms that allow to meet the requirements.
1. CPreferences::DirectCall. This is the mechanism of requesting information from a data object straight at the moment of painting, sorting and filtration. All these operations are carried out only from the GUI thread. In case if the data object is functioning in a multithread application it has to protect its internal data by such synchronizing objects as critical section or mutex.
2. CPreferences::MemoryBuffer. These mechanism copies unformatted and formatted values of a data object in a calling thread and then forward them to the GUI thread. Having received these data the grid performs their drawing on the screen, filtration and sorting without accessing the data object from the GUI thread. In this case if all simultaneous accesses to the data object can be done only from one thread then it's no need to protect it by critical section.
DirectCall | Common::CDataObject is protected by critical sections or mutexes. |
MemoryBuffer | CGrid copies all data in the calling thread and doesn't call Common::CDataObject functions anymore. |
CPreferences::ThreadingMode GetThreadingMode | ( | ) | [static] |
Gets a current threading mode.
void SetThreadingMode | ( | ThreadingMode | threadingMode | ) | [static] |
Sets a new threading mode.
It is recomended to set this parameter only once at start of the application and don't change it anymore.
[in] | threadingMode | A new threading mode. |
CFont * GetFont | ( | ) | [static] |
Gets the default font used in grids.
void SetFont | ( | CFont * | font | ) | [static] |
Sets a default font to be used in grids.
[in] | font | A new font |
CAppearance & GetDefaultAppearance | ( | ) | [static] |
Gets the default appearance used in grids.
void SetDefaultAppearance | ( | CAppearance & | appearance | ) | [static] |
Sets a new appearance to be used in grids.
[in] | appearance | A new appearance |
ICustomDraw & GetDefaultCustomDraw | ( | ) | [static] |
ILinePaintFormat & GetDefaultLinePaintFormat | ( | ) | [static] |
Gets a default implementation of ILinePaintFormat interface.
ICellPaintFormat & GetDefaultCellPaintFormat | ( | ) | [static] |
Gets a default implementation of ICellPaintFormat interface.
IHeaderPaintFormat & GetDefaultHeaderPaintFormat | ( | ) | [static] |
Gets a default implementation of IHeaderPaintFormat interface.
IColumnPaintFormat & GetDefaultColumnPaintFormat | ( | ) | [static] |
Gets a default implementation of IColumnPaintFormat interface.
IDragDrop & GetDefaultDragDrop | ( | ) | [static] |
ICopyPaste & GetDefaultCopyPaste | ( | ) | [static] |
IEditInPlace & GetDefaultEditInPlace | ( | ) | [static] |
IKeyManager & GetDefaultKeyManager | ( | ) | [static] |
ITooltipCtrl * CreateDefaultTooltipCtrl | ( | ) | [static] |
Gets a default implementation of ITooltipCtrl interface for tooltips.
Each time when the function is called it creates a new object of CTooltipCtrl type with 'true' value passed to the constructor. That means, that CGrid will handle a life time of an object and will destroy it in the destructor.
ITooltipCtrl * CreateDefaultInPlaceTooltipCtrl | ( | ) | [static] |
Gets a default implementation of ITooltipCtrl interface for 'in place' tooltips.
Each time when the function is called it creates a new object of CInPlaceTooltipCtrl type with 'true' value passed to the constructor. That means, that CGrid will handle a life time of an object and will destroy it in the destructor.
Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |