A widget holding this trait can supply the names of its default render tables to any requestor
Format
#include <Xm/SpecRenderT.h> typedef struct { int version; XmSpecRenderGetTableProc getRenderTable; } XmSpecRenderTraitRec, *XmSpecRenderTrait; XmRenderTable (*XmSpecRenderGetTableProc)WidgetXtEnum
DESCRIPTION
A widget holding the XmQTspecifyRenderTable trait is responsible for providing a requestor with a suitable render table. Any manager widget holding this trait should provide the following three resources:
The getRenderTable trait method of XmQTspecifyRenderTable will use the values of the three resources as the basis for its returned information.
The XmQTspecifyRenderTable trait is somewhat unusual in that other widgets do not access its trait method through the usual trait mechanisms. Instead, other widgets access the getRenderTable trait method by calling XmeGetDefaultRenderTable.
The following standard Motif widgets hold this trait:
The ExmGrid demonstration widget also installs this trait.
XmRenderTable getRenderTableWidget widgetXtEnum renderTableType
The getRenderTable trait method returns a render table corresponding to the renderTableType of widget widget. This value (if non-NULL) is the internal value of the manager's render table, and should not be modified or freed.
For example, given a manager widget named MyManagerWidget that supports the correct render table resources, the following is a sample implementation of the trait method:
static XmRenderTable GetRenderTable( Widget widget, XtEnum renderTableType) { XmMyManagerWidget mm = (XmMyManagerWidget) widget; switch(renderTableType) { case XmLABEL_RENDER_TABLE: return mm->my_manager.label_render_table; case XmBUTTON_RENDER_TABLE: return mm->my_manager.button_render_table; case XmTEXT_RENDER__RENDER_TABLE: return mm->my_manager.text_render_table; } return NULL; } |
RELATED
XmBulletinBoard(3), VendorShell(3), XmMenuShell(3), and XmeGetDefaultRenderTable(3).