SketchUp C API
|
A styles entity reference. More...
#include <SketchUpAPI/model/styles.h>
Related Functions | |
(Note that these are not member functions.) | |
enum SUResult | SUStyleCreate (SUStyleRef *style) |
Creates an empty style object. More... | |
enum SUResult | SUStyleCreateFromFile (SUStyleRef *style, const char *path) |
Creates a style object from a file at the given path. More... | |
enum SUResult | SUStyleRelease (SUStyleRef *style) |
Releases a style object. More... | |
SUEntityRef | SUStyleToEntity (SUStyleRef style) |
Converts from an SUStyleRef to an SUEntityRef. This is essentially an upcast operation. More... | |
SUStyleRef | SUStyleFromEntity (SUEntityRef entity) |
Converts from an SUEntityRef to an SUStyleRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUStyleRef. More... | |
enum SUResult | SUStyleSetName (SUStyleRef style, const char *name) |
Sets the name of a style object. More... | |
enum SUResult | SUStyleGetName (SUStyleRef style, SUStringRef *name) |
Retrieves the name of a style object. More... | |
enum SUResult | SUStyleGetDisplayName (SUStyleRef style, SUStringRef *name) |
Retrieves the display name of a style object. If the name begins with a wildcard character "*" the wildcard will be replaced be a default string. The default string defaults to "*", so is no default string is set this function will always return the same string as GetName. More... | |
enum SUResult | SUStyleSetDescription (SUStyleRef style, const char *description) |
Sets the description of a style object. More... | |
enum SUResult | SUStyleGetDescription (SUStyleRef style, SUStringRef *description) |
Retrieves the description of a style object. More... | |
enum SUResult | SUStyleGetPath (SUStyleRef style, SUStringRef *path) |
Retrieves the filepath to the file which was used to import this style. More... | |
enum SUResult | SUStyleGetGuid (SUStyleRef style, SUStringRef *guid) |
Retrieves the GUID of a style object. More... | |
enum SUResult | SUStyleGetDisplaysWatermark (SUStyleRef style, bool *shows_mark) |
Retrieves a boolean indicating whether the style displays a watermark. More... | |
enum SUResult | SUStyleSaveToFile (SUStyleRef style, const char *path) |
Saves the style data to the specified path. More... | |
enum SUResult | SUStyleSetProperty (SUStyleRef style, enum SUStylePropertyType type, SUTypedValueRef value) |
Sets the value of the specified SUStylePropertyType. More... | |
enum SUResult | SUStyleGetProperty (SUStyleRef style, enum SUStylePropertyType type, SUTypedValueRef *value) |
Retrieves a SUTypedValueRef containing the value of the specified SUStylePropertyType. More... | |
enum SUResult | SUStyleGetThumbnail (SUStyleRef style, SUImageRepRef *image) |
Retrieves an image containing the style's thumbnail. The given image representation object must have been constructed using SUImageRepCreate(). It must be released using SUImageRepRelease(). More... | |
enum SUResult | SUStylesAddStyle (SUStylesRef styles, const char *path, bool activate) |
Adds a new style to the styles object from a file at the given path. Optionally will set the new style as the active style. More... | |
enum SUResult | SUStylesGetNumStyles (SUStylesRef styles, size_t *count) |
Retrieves the number of styles in a styles object. More... | |
enum SUResult | SUStylesGetStyles (SUStylesRef styles, size_t len, SUStyleRef style_array[], size_t *count) |
Retrieves all the styles associated with a styles object. More... | |
enum SUResult | SUStylesGetActiveStyle (SUStylesRef styles, SUStyleRef *style) |
Retrieves the active style. More... | |
enum SUResult | SUStylesGetSelectedStyle (SUStylesRef styles, SUStyleRef *style) |
Retrieves the selected style. More... | |
enum SUResult | SUStylesGetStyleByGuid (SUStylesRef styles, const char *guid, SUStyleRef *style) |
Retrieves the style corresponding to the specified Guid. More... | |
enum SUResult | SUStylesGetStyleByPath (SUStylesRef styles, const char *path, SUStyleRef *style) |
Retrieves the style corresponding to the specified path. More... | |
enum SUResult | SUStylesGetActiveStyleChanged (SUStylesRef styles, bool *changed) |
Retrieves a bolean indicating if the active style has changed. More... | |
enum SUResult | SUStylesApplyStyleToScene (SUStylesRef styles, SUStyleRef style, SUSceneRef scene) |
Applies the specified style to the specified scene. More... | |
enum SUResult | SUStylesSetSelectedStyle (SUStylesRef styles, SUStyleRef style) |
Sets the selected style. More... | |
enum SUResult | SUStylesRemoveStyle (SUStylesRef styles, SUStyleRef *style) |
Delete the selected style. The style will be removed from all scenes that use it and then released. The first different style in the style manager will replace the style on model pages. The manager must have at least one style remaining. More... | |
A styles entity reference.
|
related |
Creates an empty style object.
[out] | style | The style object. |
|
related |
Creates a style object from a file at the given path.
[out] | style | The style object. |
[in] | path | The file path. Assumed to be UTF-8 encoded. |
|
related |
Converts from an SUEntityRef to an SUStyleRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUStyleRef.
[in] | entity | The entity object. |
|
related |
Retrieves the description of a style object.
[in] | style | The style object. |
[out] | description | The description retrieved. |
|
related |
Retrieves the display name of a style object. If the name begins with a wildcard character "*" the wildcard will be replaced be a default string. The default string defaults to "*", so is no default string is set this function will always return the same string as GetName.
[in] | style | The style object. |
[out] | name | The display name retrieved. |
|
related |
Retrieves a boolean indicating whether the style displays a watermark.
[in] | style | The style object. |
[out] | shows_mark | The boolean retrieved. |
|
related |
Retrieves the GUID of a style object.
[in] | style | The style object. |
[out] | guid | The GUID retrieved. |
|
related |
Retrieves the name of a style object.
[in] | style | The style object. |
[out] | name | The name retrieved. |
|
related |
Retrieves the filepath to the file which was used to import this style.
[in] | style | The style object. |
[out] | path | The path retrieved. |
|
related |
Retrieves a SUTypedValueRef containing the value of the specified SUStylePropertyType.
[in] | style | The style object. |
[in] | type | The style type to retrieve. |
[out] | value | The SUTypedValueRef retrieved. |
|
related |
Retrieves an image containing the style's thumbnail. The given image representation object must have been constructed using SUImageRepCreate(). It must be released using SUImageRepRelease().
[in] | style | The style object. |
[out] | image | The image object retrieved. |
|
related |
Releases a style object.
[in] | style | The style object. |
|
related |
Adds a new style to the styles object from a file at the given path. Optionally will set the new style as the active style.
NOTE: Return value SU_ERROR_SERIALIZATION was added for SketchUp 2019, API 7.0
[in] | styles | The styles object. |
[in] | path | The string specifying the file path to the new style. |
[in] | activate | If true activate the style. |
|
related |
Applies the specified style to the specified scene.
[in] | styles | The styles object. |
[in] | style | The style to be applied to a scene. |
[in] | scene | The scene to which the style will be applied. |
|
related |
Saves the style data to the specified path.
[in] | style | The style object. |
[in] | path | The path to where the data should be saved. Assumed to be UTF-8 encoded. |
|
related |
Sets the description of a style object.
[in] | style | The style object. |
[in] | description | The description string to set the style object. Assumed to be UTF-8 encoded. |
|
related |
Sets the name of a style object.
[in] | style | The style object. |
[in] | name | The name string to set the style object. Assumed to be UTF-8 encoded. |
|
related |
Sets the value of the specified SUStylePropertyType.
[in] | style | The style object. |
[in] | type | The style type to set. |
[in] | value | The value to set for type. |
|
related |
Retrieves the active style.
[in] | styles | The styles object. |
[out] | style | Pointer to a SUStyleRef for returning the style. |
|
related |
Retrieves a bolean indicating if the active style has changed.
[in] | styles | The styles object. |
[out] | changed | Returns true if the active style was changed. |
|
related |
Retrieves the number of styles in a styles object.
[in] | styles | The styles object. |
[out] | count | The number of style objects available. |
|
related |
Retrieves the selected style.
[in] | styles | The styles object. |
[out] | style | Pointer to a SUStyleRef for returning the style. |
|
related |
Retrieves the style corresponding to the specified Guid.
[in] | styles | The styles object. |
[in] | guid | The string specifying a style by Guid. |
[out] | style | Pointer to a SUStyleRef for returning the style. |
|
related |
Retrieves the style corresponding to the specified path.
[in] | styles | The styles object. |
[in] | path | The string specifying a style by path. |
[out] | style | Pointer to a SUStyleRef for returning the style. |
|
related |
Retrieves all the styles associated with a styles object.
[in] | styles | The styles object. |
[in] | len | The number of style objects to retrieve. |
[out] | style_array | The style objects retrieved. |
[out] | count | The number of style objects retrieved. |
|
related |
Delete the selected style. The style will be removed from all scenes that use it and then released. The first different style in the style manager will replace the style on model pages. The manager must have at least one style remaining.
[in] | styles | The styles object. |
[in,out] | style | The style object. |
|
related |
Sets the selected style.
[in] | styles | The styles object. |
[in] | style | The style object. |
|
related |
Converts from an SUStyleRef to an SUEntityRef. This is essentially an upcast operation.
[in] | style | The style object. |