[A] Added adding_strategy
property to the tables
This commit is contained in:
27
src/fort.hpp
27
src/fort.hpp
@@ -60,6 +60,17 @@ enum class row_type {
|
||||
header = FT_ROW_HEADER
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding strategy.
|
||||
*
|
||||
* Determines what happens with old content if current cell is not empty after
|
||||
* adding data to it. Default strategy is 'replace'.
|
||||
*/
|
||||
enum class add_strategy {
|
||||
replace = FT_STRATEGY_REPLACE,
|
||||
insert = FT_STRATEGY_INSERT
|
||||
};
|
||||
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
@@ -893,6 +904,22 @@ public:
|
||||
{
|
||||
return FT_IS_SUCCESS(ft_set_tbl_prop(table_, FT_TPROP_BOTTOM_MARGIN, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set table adding strategy.
|
||||
*
|
||||
* @param value
|
||||
* Adding strategy.
|
||||
* @return
|
||||
* - true: Success; table property was changed.
|
||||
* - false: In case of error.
|
||||
*/
|
||||
bool set_adding_strategy(fort::add_strategy value)
|
||||
{
|
||||
return FT_IS_SUCCESS(ft_set_tbl_prop(table_,
|
||||
FT_TPROP_ADDING_STRATEGY,
|
||||
static_cast<int>(value)));
|
||||
}
|
||||
private:
|
||||
ft_table_t *table_;
|
||||
mutable std::stringstream stream_;
|
||||
|
Reference in New Issue
Block a user