ruby-****@sourc*****
ruby-****@sourc*****
2005年 6月 9日 (木) 11:00:54 JST
------------------------- REMOTE_ADDR = 219.53.36.42 REMOTE_HOST = REMOTE_USER = ruby-gnome2-hiki URL = http://ruby-gnome2.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Gnome%3A%3APrintUnit ------------------------- @@ -1,68 +1,118 @@ = class Gnome::PrintUnit +== Object Hierarchy +* Object + * GLib::Boxed + * Gnome::PrintUnit + == Class Methods +--- Gnome::PrintUnit.default + + Used to get the default Gnome::PrintUnit ---- get_identify(base) - * base: a Gnome::PrintUnitBase object. - * Returns: the identified unit which has ((|base|)), or nil. + * Returns: the default Gnome::PrintUnit ---- default - * Returns: the default unit, it's Gnome::PrintUnit object. +--- Gnome::PrintUnit.get_by_abbreviation(abbreviation) + + Get a unit based on its abbreviation, for example "cm", + "pts" or "in". ---- get_by_name(name) - * name: the name of unit. - * Returns: specified unit, or nil. + * abbreviation: Abbreviation of the unit, as a string + * Returns: a Gnome::PrintUnit, (({nil})) on error ---- get_by_abbreviation(abbreviation) - * abbreviation: the abbreviation of unit. - * Returns: specified unit, or nil. +--- Gnome::PrintUnit.get_by_name(name) + + Get a unit based on its name, for example "Millimeter" + or "Inches". + + * name: Name of the unit, as a string + * Returns: a Gnome::PrintUnit, (({nil})) on error ---- get_list(bases) - * bases: the bases of unit. Base can be composited by +--- Gnome::PrintUnit.get_identity(base) + + Retrieves the Gnome::PrintUnit referenced by base ((|base|)) + + * base: The base of the Gnome::PrintUnit to retrieve, + as a Gnome::PrintUnitBase. + * Returns: The Gnome::PrintUnit representing + ((|base|)), (({nil})) on error + +--- Gnome::PrintUnit.get_list(bases) + + Gets a list of the units represented by the bases + ((|bases|)). To get a list of all units then use + Gnome::PrintUnitBase::ALL. + + * bases: The bases to include in the list, as a + Gnome::PrintUnitBase. Can combine bases by using Gnome::PrintUnitBase#|. - * Returns: an array of specified units. + * Returns: An array of representing ((|bases|)), an + empty array on error == Instance Methods +--- abbr + + * Returns: The abbreviation of (({self})) ---- name - * Returns: the name of unit. +--- abbr_plural + + * Returns: The plural form of abbreviation of (({self})) --- base - * Returns: the Gnome::PrintUnitBase of unit. + + * Returns: The base of (({self})), as Gnome::PrintUnitBase ---- unit_to_base - * Returns: the value of unit to base. +--- convert_distance(distance, to) + + Check whether a conversion between (({self})) and + ((|to|)) can be made ---- abbr - * Returns: the abbreviation of unit. + * distance: The distance to convert, as a number + * to: Units to convert to, as a Gnome::PrintUnit + * Returns: The converted distance on success, (({nil})) on + error ---- plural - * Returns: the plural of unit. +--- convert_distance_full(distance, to, ctm_scale, device_scale) + + Convert a distance from one unit to another. You should + supply a scale as necessary. ---- abbr_plural - * Returns: the plural of abbreviation of unit. + ((|ctm_scale|)) is userspace->absolute, + ((|device_scale|)) is device->absolute ---- convert_distance(distance, to) - * distance: the target distance. - * to: the unit to convert. - * Returns: the converted distance, nil on error. + * distance: The distance to convert, as a number + * to: Units to convert to, as a Gnome::PrintUnit + * ctm_scale: The userspace scale to use, as a number + * device_scale: The device scale to use, as a number + * Returns: The converted distance on success, (({nil})) + on error ---- convert_distance_full(distance, to, ctm_scale, device_scale) - * distance: the target distance. - * to: the unit to convert. - * ctm_scale: uses device scale when - ((|self|))/((|to|))'s base is Gnome::PrintUnitBase::USERSPACE. - * device_scale: uses device scale when - ((|self|))/((|to|))'s base is Gnome::PrintUnitBase::DEVICE. - * Returns: the converted distance, nil on errror. +--- name + + * Returns: The name of (({self})) -== Constants +--- plural + + * Returns: The plural form of name of (({self})) +--- unit_to_base + + * Returns: The unit to base of (({self})) + +--- version + + * Returns: The version of (({self})) + +== Constants --- PS_UNIT - The unit of PS. == See Also Gnome::PrintUnitBase + +== ChangeLog + +* 2005-06-09 ((<kou>)): completed + +- ((<kou>)) -- kou \ No newline at end of file