stlab.adobe.com Adobe Systems Incorporated

#include <number_unit.hpp>

List of all members.

Public Member Functions

 unit_t ()

Public Attributes

adobe::name_t base_unit_filter_m
unsigned int base_unit_id_m
adobe::name_t base_unit_m
unsigned int decimal_places_m
std::string format_m
double increment_m
double max_value_m
double min_value_m
std::string name_m
double scale_b_m
double scale_m_m
std::string short_name_m
bool trailing_zeroes_m
unsigned long unit_name_m

Detailed Description

This struct is a decoration utility used by widgets that need to format number information for the user. As it stands the struct is to describe a single linear transformation of a number from its base unit to this unit. For instance, a cell in the property model may hold a number in units inches, and a unit_t decorator for a display_number_t would detail how to convert that value to units centimeters by means of a linear transformation. The display_number_t will select the most appropriate linear transformation of its set of possibilities when displaying the value from the property model.

Definition at line 46 of file number_unit.hpp.


Constructor & Destructor Documentation

unit_t (  )

Default constructor. Yay.

Definition at line 51 of file number_unit.hpp.


Member Data Documentation

this is the name of the "base unit" group to which this linear transformation is to relate

Definition at line 72 of file number_unit.hpp.

unsigned int base_unit_id_m

Definition at line 76 of file number_unit.hpp.

this is the name of the "base unit" group to which this linear transformation is to relate

Definition at line 74 of file number_unit.hpp.

unsigned int decimal_places_m

this is the name of the "base unit" group to which this linear transformation is to relate

this will be the formatting information for the result of the transformation instead of format_m

Definition at line 79 of file number_unit.hpp.

std::string format_m

legacy format printf-style string

Definition at line 83 of file number_unit.hpp.

double increment_m

in some instances the user is able to increment the value. This specifies the amount (in this unit) that the user can increment the value.

Definition at line 86 of file number_unit.hpp.

double max_value_m

optional maximum value for this unit -- the value cannot go above this value when this unit represents it.

Definition at line 98 of file number_unit.hpp.

double min_value_m

optional minimum value for this unit -- the value cannot go below this value when this unit represents it.

Definition at line 95 of file number_unit.hpp.

std::string name_m

this is the name of the unit this linear transformation represents

Definition at line 68 of file number_unit.hpp.

double scale_b_m

y-intersect to go from this unit to the base unit using y = mx + b

Definition at line 92 of file number_unit.hpp.

double scale_m_m

multiplier to go from this unit to the base unit using y = mx + b

Definition at line 89 of file number_unit.hpp.

std::string short_name_m

this is the short name of the unit this linear transformation represents (ie cm for centimeters)

Definition at line 70 of file number_unit.hpp.

Definition at line 80 of file number_unit.hpp.

unsigned long unit_name_m

Definition at line 65 of file number_unit.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google