NAME

App::MathImage::Glib::Ex::EnumBits -- misc enum helpers

SYNOPSIS

use App::MathImage::Glib::Ex::EnumBits;

FUNCTIONS

$str = App::MathImage::Glib::Ex::EnumBits::to_text ($enum_class, $nick)

Return a text form for value $nick from $enum_class. This is meant to be suitable for display in a menu, label, etc.

$enum_class is a string class name such as "Glib::UserDirectory". If that class has a $enum_class->EnumBits_to_text ($nick) method then it's called, otherwise to_text_default below.

$str = App::MathImage::Glib::Ex::EnumBits::to_text_default ($enum_class, $nick)

Return a text form for value $nick from $enum_class. This function is the default for to_text above and can be used as a fallback in a to_text method.

The nick is split into words and numbers, and ucfirst applied to each word. So for example "some-val1" gives "Some Val 1".

SEE ALSO

Glib, Glib::Type

App::MathImage::Gtk2::Ex::ComboBox::EnumValues