Archicad 29 C++ API
Loading...
Searching...
No Matches
ACAPI::Keynote::KeynoteItem Class Reference

A class that represents an item in the keynote tree structure. More...

#include <KeynoteItem.hpp>

Inheritance diagram for ACAPI::Keynote::KeynoteItem:
ACAPI::Object

Public Member Functions

API_Guid GetId () const
 
ItemKey GetKey () const
 
Result< void > SetKey (const ItemKey &newKey)
 Modifies the Key of the item.
 
Title GetTitle () const
 
Result< void > SetTitle (const Title &newTitle)
 Modifies the Title of the item.
 
Description GetDescription () const
 
Result< void > SetDescription (const Description &newDescription)
 Modifies the Description of the item.
 
Reference GetReference () const
 
Result< void > SetReference (const Reference &newReference)
 Modifies the Reference of the item.
 
GS::UniString GetUIText () const
 
- Public Member Functions inherited from ACAPI::Object
 Object (std::shared_ptr< Impl::ObjectImpl > impl)
 Constructs a new object.
 
const API_TokenGetToken () const
 Get the token for this object.
 

Friends

class Impl::KeynoteFolderImpl
 
class KeynoteFolder
 

Additional Inherited Members

- Protected Member Functions inherited from ACAPI::Object
 ~Object ()
 Default destructor.
 
- Protected Attributes inherited from ACAPI::Object
std::shared_ptr< Impl::ObjectImplmImpl
 Impl object given by constructor.
 

Detailed Description

A class that represents an item in the keynote tree structure.

Since
Archicad 28

Member Function Documentation

◆ GetDescription()

Description ACAPI::Keynote::KeynoteItem::GetDescription ( ) const
Returns
The description of the item

◆ GetId()

API_Guid ACAPI::Keynote::KeynoteItem::GetId ( ) const
Returns
The database Id of the item

◆ GetKey()

ItemKey ACAPI::Keynote::KeynoteItem::GetKey ( ) const
Returns
The key of the item

◆ GetReference()

Reference ACAPI::Keynote::KeynoteItem::GetReference ( ) const
Returns
The reference of the item

◆ GetTitle()

Title ACAPI::Keynote::KeynoteItem::GetTitle ( ) const
Returns
The title of the item

◆ GetUIText()

GS::UniString ACAPI::Keynote::KeynoteItem::GetUIText ( ) const
Returns
The text representation of the item, used on UI elements

◆ SetDescription()

Result< void > ACAPI::Keynote::KeynoteItem::SetDescription ( const Description & newDescription)

Modifies the Description of the item.

Parameters
newDescriptionThe Description to be set
Returns
The result of the modification
ACAPI::Keynote::KeynoteItem firstItem = items.Unwrap ()[0];
ACAPI_CallUndoableCommand ("Modify first keynote item", [&firstItem]() -> GSErrCode {
if (firstItem.SetKey("K-API").IsErr()) {
return Error;
}
if (firstItem.SetTitle ("Title set for Item by API").IsErr ()) {
return Error;
}
if (firstItem.SetDescription ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
if (firstItem.SetReference ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
return NoError;
});

◆ SetKey()

Result< void > ACAPI::Keynote::KeynoteItem::SetKey ( const ItemKey & newKey)

Modifies the Key of the item.

Parameters
newKeyThe key to be set
Returns
The result of the modification
ACAPI::Keynote::KeynoteItem firstItem = items.Unwrap ()[0];
ACAPI_CallUndoableCommand ("Modify first keynote item", [&firstItem]() -> GSErrCode {
if (firstItem.SetKey("K-API").IsErr()) {
return Error;
}
if (firstItem.SetTitle ("Title set for Item by API").IsErr ()) {
return Error;
}
if (firstItem.SetDescription ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
if (firstItem.SetReference ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
return NoError;
});

◆ SetReference()

Result< void > ACAPI::Keynote::KeynoteItem::SetReference ( const Reference & newReference)

Modifies the Reference of the item.

Parameters
newReferenceThe Reference to be set
Returns
The result of the modification
ACAPI::Keynote::KeynoteItem firstItem = items.Unwrap ()[0];
ACAPI_CallUndoableCommand ("Modify first keynote item", [&firstItem]() -> GSErrCode {
if (firstItem.SetKey("K-API").IsErr()) {
return Error;
}
if (firstItem.SetTitle ("Title set for Item by API").IsErr ()) {
return Error;
}
if (firstItem.SetDescription ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
if (firstItem.SetReference ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
return NoError;
});

◆ SetTitle()

Result< void > ACAPI::Keynote::KeynoteItem::SetTitle ( const Title & newTitle)

Modifies the Title of the item.

Parameters
newTitleThe Title to be set
Returns
The result of the modification
ACAPI::Keynote::KeynoteItem firstItem = items.Unwrap ()[0];
ACAPI_CallUndoableCommand ("Modify first keynote item", [&firstItem]() -> GSErrCode {
if (firstItem.SetKey("K-API").IsErr()) {
return Error;
}
if (firstItem.SetTitle ("Title set for Item by API").IsErr ()) {
return Error;
}
if (firstItem.SetDescription ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
if (firstItem.SetReference ("Keynote item modified by the test addon").IsErr ()) {
return Error;
}
return NoError;
});