Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
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__) const
 Gets a bool pref from the Illustrator prefs data tree.
 
bool setBoolPref (const std::string &prefix_, const std::string &suffix_, const bool b_)
 Sets a bool pref in the Illustrator prefs data tree.
 
bool getIntPref (const std::string &prefix_, const std::string &suffix_, int32_t &n__) const
 Gets an integer pref from the Illustrator prefs data tree.
 
bool setIntPref (const std::string &prefix_, const std::string &suffix_, const int32_t n_)
 Sets an integer pref in the Illustrator prefs data tree.
 
bool getFloatPref (const std::string &prefix_, const std::string &suffix_, double &n__) const
 Gets a floating-point pref from the Illustrator prefs data tree.
 
bool setFloatPref (const std::string &prefix_, const std::string &suffix_, const double n_)
 Sets a floating-point pref in the Illustrator prefs data tree.
 
bool getPointPref (const std::string &prefix_, const std::string &suffix_, Point &p__) const
 Gets a point pref from the Illustrator prefs data tree.
 
bool setPointPref (const std::string &prefix_, const std::string &suffix_, const Point &p_)
 Sets a point pref in the Illustrator prefs data tree.
 
bool getRectPref (const std::string &prefix_, const std::string &suffix_, Rect &r__) const
 Gets a rectangle pref from the Illustrator prefs data tree.
 
bool setRectPref (const std::string &prefix_, const std::string &suffix_, const Rect &r_)
 Sets a rectangle pref in the Illustrator prefs data tree.
 
bool getStringPref (const std::string &prefix_, const std::string &suffix_, std::string &str__) const
 Gets a string pref from the Illustrator prefs data tree.
 
bool setStringPref (const std::string &prefix_, const std::string &suffix_, const std::string &str_)
 Sets a string pref in the Illustrator prefs data tree.
 
bool prefExists (const std::string &prefix_, const std::string &suffix_) const
 Check if a preference from the Illustrator prefs data exists.
 
bool removePref (const std::string &prefix_, const std::string &suffix_)
 Removes a preference from the Illustrator prefs data tree.
 

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

◆ getBoolPref()

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

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

◆ getFloatPref()

bool hdi::core::ai::Preferences::getFloatPref ( const std::string &  prefix_,
const std::string &  suffix_,
double &  n__ 
) const

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

◆ getIntPref()

bool hdi::core::ai::Preferences::getIntPref ( const std::string &  prefix_,
const std::string &  suffix_,
int32_t &  n__ 
) const

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

◆ getPointPref()

bool hdi::core::ai::Preferences::getPointPref ( const std::string &  prefix_,
const std::string &  suffix_,
Point p__ 
) const

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

◆ getRectPref()

bool hdi::core::ai::Preferences::getRectPref ( const std::string &  prefix_,
const std::string &  suffix_,
Rect r__ 
) const

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

◆ getStringPref()

bool hdi::core::ai::Preferences::getStringPref ( const std::string &  prefix_,
const std::string &  suffix_,
std::string &  str__ 
) const

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

◆ prefExists()

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

Check if a preference from the Illustrator prefs data exists.

Author
GW
Date
03/2023
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

◆ removePref()

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).

◆ setBoolPref()

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

◆ setFloatPref()

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

◆ setIntPref()

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

◆ setPointPref()

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

◆ setRectPref()

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

◆ setStringPref()

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