cwidget  0.5.17
Public Types | Public Member Functions | Public Attributes | List of all members
cwidget::config::column_definition Struct Reference

Defines how a single column is to be generated. More...

#include <column_definition.h>

Public Types

enum  column_type { COLUMN_LITERAL, COLUMN_GENERATED, COLUMN_PARAM }
 The available column types. More...
 

Public Member Functions

 column_definition (const std::wstring &_arg, bool _expand, bool _shrink)
 Create a literal column. More...
 
 column_definition (column_type _type, int _ival, int _width, bool _expand, bool _shrink, bool _dynamic_size)
 Create a generated or parametric column. More...
 

Public Attributes

column_type type
 The type of this column. More...
 
int ival
 The parameter number (for positional parameter columns) or column type (for generated columns). More...
 
std::wstring arg
 The text of this column if it is a literal column. More...
 
unsigned int width
 The width of this column if it is generated or taken from a positional parameter. More...
 
bool expand:1
 If true, this column is allowed to expand during layout. More...
 
bool shrink:1
 If true, this column is allowed to shrink during layout. More...
 
bool dynamic_size:1
 Whether to redefine the column width based on the actual string (for generated and parametric columns). More...
 

Detailed Description

Defines how a single column is to be generated.

See also
column_generator

Member Enumeration Documentation

◆ column_type

The available column types.

Enumerator
COLUMN_LITERAL 

A literal column.

The text of a literal column is taken from its arg member.

COLUMN_GENERATED 

A dynamically generated column.

The text and width of a generated column are computed by calling column_generator::setup_column.

COLUMN_PARAM 

A column defined by a positional parameter.

The text of a column defined by a positional parameter is constructed by calling column_parameters::get_param.

See also
column_parameters

Constructor & Destructor Documentation

◆ column_definition() [1/2]

cwidget::config::column_definition::column_definition ( const std::wstring &  _arg,
bool  _expand,
bool  _shrink 
)
inline

Create a literal column.

◆ column_definition() [2/2]

cwidget::config::column_definition::column_definition ( column_type  _type,
int  _ival,
int  _width,
bool  _expand,
bool  _shrink,
bool  _dynamic_size 
)
inline

Create a generated or parametric column.

Member Data Documentation

◆ arg

std::wstring cwidget::config::column_definition::arg

The text of this column if it is a literal column.

See also
COLUMN_LITERAL

◆ dynamic_size

bool cwidget::config::column_definition::dynamic_size

Whether to redefine the column width based on the actual string (for generated and parametric columns).

If true, then width will be ignored and the true width of the actual string will be used in layout.

◆ expand

bool cwidget::config::column_definition::expand

If true, this column is allowed to expand during layout.

◆ ival

int cwidget::config::column_definition::ival

The parameter number (for positional parameter columns) or column type (for generated columns).

See also
COLUMN_PARAM, COLUMN_GENERATED

◆ shrink

bool cwidget::config::column_definition::shrink

If true, this column is allowed to shrink during layout.

◆ type

column_type cwidget::config::column_definition::type

The type of this column.

◆ width

unsigned int cwidget::config::column_definition::width

The width of this column if it is generated or taken from a positional parameter.

See also
COLUMN_GENERATED, COLUMN_PARAM

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