Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Member Functions | Friends | List of all members
hdi::core::ai::Preferences Class Reference

Allows access to and manipulation of Illustrator app preferences; can be used to store plugin preferences as well, but the core::Preferences class is recommended over this one. More...

#include <hdicoreaiPreferences.h>

Public Member Functions

bool getBoolPref (const std::string &prefix_, const std::string &suffix_, bool &b__)
 Gets a bool pref from the Illustrator prefs data tree. More...
 
bool setBoolPref (const std::string &prefix_, const std::string &suffix_, const bool b_)
 Sets a bool pref in the Illustrator prefs data tree. More...
 
bool getIntPref (const std::string &prefix_, const std::string &suffix_, int32_t &n__)
 Gets an integer pref from the Illustrator prefs data tree. More...
 
bool setIntPref (const std::string &prefix_, const std::string &suffix_, const int32_t n_)
 Sets an integer pref in the Illustrator prefs data tree. More...
 
bool getFloatPref (const std::string &prefix_, const std::string &suffix_, double &n__)
 Gets a floating-point pref from the Illustrator prefs data tree. More...
 
bool setFloatPref (const std::string &prefix_, const std::string &suffix_, const double n_)
 Sets a floating-point pref in the Illustrator prefs data tree. More...
 
bool getPointPref (const std::string &prefix_, const std::string &suffix_, Point &p__)
 Gets a point pref from the Illustrator prefs data tree. More...
 
bool setPointPref (const std::string &prefix_, const std::string &suffix_, const Point &p_)
 Sets a point pref in the Illustrator prefs data tree. More...
 
bool getRectPref (const std::string &prefix_, const std::string &suffix_, Rect &r__)
 Gets a rectangle pref from the Illustrator prefs data tree. More...
 
bool setRectPref (const std::string &prefix_, const std::string &suffix_, const Rect &r_)
 Sets a rectangle pref in the Illustrator prefs data tree. More...
 
bool getStringPref (const std::string &prefix_, const std::string &suffix_, std::string &str__)
 Gets a string pref from the Illustrator prefs data tree. More...
 
bool setStringPref (const std::string &prefix_, const std::string &suffix_, const std::string &str_)
 Sets a string pref in the Illustrator prefs data tree. More...
 
bool removePref (const std::string &prefix_, const std::string &suffix_)
 Removes a preference from the Illustrator prefs data tree. More...
 

Friends

class core::Illustrator
 

Detailed Description

Allows access to and manipulation of Illustrator app preferences; can be used to store plugin preferences as well, but the core::Preferences class is recommended over this one.

Member Function Documentation

bool hdi::core::ai::Preferences::getBoolPref ( const std::string &  prefix_,
const std::string &  suffix_,
bool &  b__ 
)

Gets a bool pref from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
b__Return-by-reference for the bool value
Returns
true if the bool could be acquired, false otherwise
bool hdi::core::ai::Preferences::getFloatPref ( const std::string &  prefix_,
const std::string &  suffix_,
double &  n__ 
)

Gets a floating-point pref from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
n__Return-by-reference for the float value
Returns
true if the number could be acquired, false otherwise
bool hdi::core::ai::Preferences::getIntPref ( const std::string &  prefix_,
const std::string &  suffix_,
int32_t &  n__ 
)

Gets an integer pref from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
n__Return-by-reference for the integer value
Returns
true if the number could be acquired, false otherwise
bool hdi::core::ai::Preferences::getPointPref ( const std::string &  prefix_,
const std::string &  suffix_,
Point p__ 
)

Gets a point pref from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
p__Return-by-reference for the point pref
Returns
true if the point could be acquired, false otherwise
bool hdi::core::ai::Preferences::getRectPref ( const std::string &  prefix_,
const std::string &  suffix_,
Rect r__ 
)

Gets a rectangle pref from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
r__Return-by-reference for the rectangle pref
Returns
true if the rectangle could be acquired, false otherwise
bool hdi::core::ai::Preferences::getStringPref ( const std::string &  prefix_,
const std::string &  suffix_,
std::string &  str__ 
)

Gets a string pref from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
str__Return-by-reference for the string pref, as UTF-8
Returns
true if the string could be acquired, false otherwise
bool hdi::core::ai::Preferences::removePref ( const std::string &  prefix_,
const std::string &  suffix_ 
)

Removes a preference from the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, as UTF-8
suffix_The name of the preference, as UTF-8
Returns
true if the pref could be removed, false otherwise
Warning
Do not attempt to remove a preference that your plugin did not create (or perhaps a pref created by another plugin under your control).
bool hdi::core::ai::Preferences::setBoolPref ( const std::string &  prefix_,
const std::string &  suffix_,
const bool  b_ 
)

Sets a bool pref in the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
b_bool value to set
Returns
true if the bool value was set, false otherwise
bool hdi::core::ai::Preferences::setFloatPref ( const std::string &  prefix_,
const std::string &  suffix_,
const double  n_ 
)

Sets a floating-point pref in the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
n_Float value to set
Returns
true if the number was set, false otherwise
bool hdi::core::ai::Preferences::setIntPref ( const std::string &  prefix_,
const std::string &  suffix_,
const int32_t  n_ 
)

Sets an integer pref in the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
n_Integer value to set
Returns
true if the number was set, false otherwise
bool hdi::core::ai::Preferences::setPointPref ( const std::string &  prefix_,
const std::string &  suffix_,
const Point p_ 
)

Sets a point pref in the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
p_Point pref to set
Returns
true if the point was set, false otherwise
bool hdi::core::ai::Preferences::setRectPref ( const std::string &  prefix_,
const std::string &  suffix_,
const Rect r_ 
)

Sets a rectangle pref in the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
r_Rectangle pref to set
Returns
true if the rectangle was set, false otherwise
bool hdi::core::ai::Preferences::setStringPref ( const std::string &  prefix_,
const std::string &  suffix_,
const std::string &  str_ 
)

Sets a string pref in the Illustrator prefs data tree.

Author
GW
Date
07/2014
Parameters
prefix_Typically the name of the plug-in, or "" for an application preference, as UTF-8
suffix_The name of the preference, as UTF-8
str_String pref to set, as UTF-8
Returns
true if the string was set, false otherwise