GadgetPtr Class Reference

#include <c4d_gui.h>

Detailed Description

An ID class for dialog gadgets. Can either be initialized with a gadget ID or pointer.
Most of the time it is not needed to create this object manually, but can rely on the temporary generated by the compiler:

C4DGadget* ptr = dlg.AddStaticText(123, ...); // Generates GadgetPtr(123)
String temp;
dlg.GetString(ptr, temp); // Generates GadgetPtr(ptr)
dlg.GetString(123, temp); // Generates GadgetPtr(123)
Represents a gadget in a dialog.
Definition: c4d_gui.h:107
Definition: c4d_string.h:39
char ** ptr
Definition: pycore_dtoa.h:13

Public Member Functions

 GadgetPtr (Int32 t_id)
 
 GadgetPtr (C4DGadget *t_gad)
 
Int32 Id () const
 
C4DGadgetPtr () const
 

Private Attributes

Int32 _id
 
C4DGadgetgad
 

Constructor & Destructor Documentation

◆ GadgetPtr() [1/2]

GadgetPtr ( Int32  t_id)

Creates a gadget pointer from an ID.

Parameters
[in]t_idThe ID.

◆ GadgetPtr() [2/2]

GadgetPtr ( C4DGadget t_gad)

Creates a gadget pointer from a pointer.

Parameters
[in]t_gadThe gadget pointer.

Member Function Documentation

◆ Id()

Int32 Id ( ) const

Gets the ID of the gadget pointer.

Returns
The gadget ID.

◆ Ptr()

C4DGadget* Ptr ( ) const

Gets the gadget pointer.

Returns
The gadget pointer.

Member Data Documentation

◆ _id

Int32 _id
private

◆ gad

C4DGadget* gad
private