SDKBrowserPreviewDialog Class Reference Library » Browser

#include <lib_browser.h>

Inheritance diagram for SDKBrowserPreviewDialog:

详细描述

Inherit to create sub-dialogs for SDKBrowserPluginInterfaceInfo::OpenPreviewDialog() .

Public Types

enum   { DontUpdatePreviewBitmap }

Private Attributes

void *  private_data

Constructor/Destructor

  SDKBrowserPreviewDialog ()
virtual  ~SDKBrowserPreviewDialog ()

Init/Update

void  Init ( SDKBrowserContentNodeRef content, Int32 tab_id)
Bool   更新 ( Int32 flags=0)

Tab

Bool   AddTab ( Int32 id, const String &name)
Bool   RemoveDefaultTab ( Int32 id)
Bool   LayoutFlushTab ( Int32 id)
Bool   LayoutAddToTab ( Int32 id)
Bool   LayoutChangedTab ( Int32 id)
Int32   GetActiveTab (void)

Preview Bitmap

void  ChangePreviewBitmap ( BaseBitmap *bm, Int32 flags=0)

GeDialog Overrides

virtual Bool   CreateLayout (void)
virtual Bool   InitValues (void)
virtual Bool   CoreMessage ( Int32 id, const BaseContainer &msg)
virtual Bool   命令 ( Int32 id, const BaseContainer &msg)
virtual Bool   AskClose (void)
virtual void  Timer (const BaseContainer &msg)
virtual void  DestroyWindow (void)
virtual Int32   消息 (const BaseContainer &msg, BaseContainer &result)

Additional Inherited Members

-  Public Member Functions inherited from SubDialog
  SubDialog (void)
virtual  ~SubDialog (void)
-  Public Member Functions inherited from GeDialog
Bool   SetColorField (const GadgetPtr &id, const TriState < 向量 > &tri, Float brightness, Float maxbrightness, Int32 flags)
  GeDialog (void)
virtual  ~GeDialog (void)
CDialog *  Get ()
Bool   Open ( DLG_TYPE dlgtype, Int32 pluginid, Int32 xpos=-1, Int32 ypos=-1, Int32 defaultw=0, Int32 defaulth=0, Int32 subid=0)
Bool   关闭 (void)
Bool   关闭 ( Bool dummy)
GeData   SendMessage (const GadgetPtr &id, const BaseContainer &msg)
Bool   SendParentMessage (const BaseContainer &msg, Bool receiveSelf=false)
Int32   GetId (void)
Bool   IsOpen ()
Bool   IsVisible ()
void  SetTimer ( Int32 timer)
void  SetTitle (const maxon::String &title)
maxon::String   GetTitle ()
Bool   启用 (const GadgetPtr &id, Bool enabled)
Bool   IsEnabled (const GadgetPtr &id)
Bool   GetInputState ( Int32 askdevice, Int32 askchannel, BaseContainer &res)
Bool   GetInputEvent ( Int32 askdevice, BaseContainer &res)
void  KillEvents (void)
Bool   SetBool (const GadgetPtr &id, Int32 value, Int32 tristate=0)
Bool   SetInt32 (const GadgetPtr &id, Int32 value, Int32 min= LIMIT < Int32 >:: MIN , Int32 max= LIMIT < Int32 >:: MAX , Int32 step=1, Int32 tristate=0, Int32 min2= LIMIT < Int32 >:: MIN , Int32 max2= LIMIT < Int32 >:: MAX )
Bool   SetFloat (const GadgetPtr &id, Float value, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0, Int32 format= FORMAT_FLOAT , Float min2=0.0, Float max2=0.0, Bool quadscale=false, Int32 tristate=0)
Bool   SetMeter (const GadgetPtr &id, Float value, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0, Int32 tristate=0)
Bool   SetDegree (const GadgetPtr &id, Float radians_value, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0, Int32 tristate=0)
Bool   SetPercent (const GadgetPtr &id, Float value, Float min=0.0, Float max=100.0, Float step=1.0, Int32 tristate=0)
Bool   SetTime (const GadgetPtr &id, const BaseDocument *doc, const BaseTime &value, const BaseTime &min= BaseTime (- 108000, 1), const BaseTime &max= BaseTime (108000, 1), Int32 stepframes=1, Int32 tristate=0)
Bool   SetString (const GadgetPtr &id, const maxon::String &text, Int32 tristate=0, Int32 flags=0)
Bool   SetColorField (const GadgetPtr &id, const 向量 &color, Float brightness, Float maxbrightness, Int32 flags)
Bool   SetFilename (const GadgetPtr &id, const Filename &fn, Int32 tristate=0)
Bool   GetBool (const GadgetPtr &id, Bool &value) const
Bool   GetInt32 (const GadgetPtr &id, Int32 &value) const
Bool   GetFloat (const GadgetPtr &id, Float &value) const
Bool   GetVector (const GadgetPtr &id_x, const GadgetPtr &id_y, const GadgetPtr &id_z, 向量 &value) const
Bool   GetString (const GadgetPtr &id, maxon::String &text) const
Bool   GetColorField (const GadgetPtr &id, 向量 &color, Float &brightness) const
Bool   GetTime (const GadgetPtr &id, const BaseDocument *doc, BaseTime &time) const
Bool   GetFilename (const GadgetPtr &id, Filename &fn) const
Bool   CheckTristateChange (const GadgetPtr &id)
Bool   SetBool (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid)
Bool   SetInt32 (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid, Int32 min= LIMIT < Int32 >:: MIN , Int32 max= LIMIT < Int32 >:: MAX , Int32 step=1, Int32 min2= LIMIT < Int32 >:: MIN , Int32 max2= LIMIT < Int32 >:: MAX )
Bool   SetFloat (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0, Int32 format= FORMAT_FLOAT , Float min2=0.0, Float max2=0.0, Bool quadscale=false)
Bool   SetMeter (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0)
Bool   SetDegree (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0)
Bool   SetPercent (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid, Float min=0.0, Float max=100.0, Float step=1.0)
Bool   SetTime (const GadgetPtr &id, const BaseDocument *doc, const BaseContainer *bc, Int32 bcid, const BaseTime &min= BaseTime (- 108000, 1), const BaseTime &max= BaseTime (108000, 1), Int32 stepframes=1)
Bool   SetString (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid, Int32 flags=0)
Bool   SetFilename (const GadgetPtr &id, const BaseContainer *bc, Int32 bcid)
Bool   SetColorField (const GadgetPtr &id, const BaseContainer *bc, Int32 bc_colid, Int32 bc_brightnessid, Float maxbrightness, Int32 flags)
Bool   GetBool (const GadgetPtr &id, BaseContainer *bc, Int32 bcid) const
Bool   GetInt32 (const GadgetPtr &id, BaseContainer *bc, Int32 bcid) const
Bool   GetFloat (const GadgetPtr &id, BaseContainer *bc, Int32 bcid) const
Bool   GetTime (const GadgetPtr &id, const BaseDocument *doc, BaseContainer *bc, Int32 bcid) const
Bool   GetVector (const GadgetPtr &id_x, const GadgetPtr &id_y, const GadgetPtr &id_z, BaseContainer *bc, Int32 bcid) const
Bool   GetString (const GadgetPtr &id, BaseContainer *bc, Int32 bcid) const
Bool   GetFilename (const GadgetPtr &id, BaseContainer *bc, Int32 bcid) const
Bool   GetColorField (const GadgetPtr &id, BaseContainer *bc, Int32 bc_colid, Int32 bc_brightnessid) const
Bool   SetBool (const GadgetPtr &id, const TriState < Bool > &tri)
Bool   SetInt32 (const GadgetPtr &id, const TriState < Int32 > &tri, Int32 min= LIMIT < Int32 >:: MIN , Int32 max= LIMIT < Int32 >:: MAX , Int32 step=1, Int32 min2= LIMIT < Int32 >:: MIN , Int32 max2= LIMIT < Int32 >:: MAX )
Bool   SetFloat (const GadgetPtr &id, const TriState < Float > &tri, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0, Int32 format= FORMAT_FLOAT , Float min2=0.0, Float max2=0.0, Bool quadscale=false)
Bool   SetMeter (const GadgetPtr &id, const TriState < Float > &tri, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0)
Bool   SetDegree (const GadgetPtr &id, const TriState < Float > &tri, Float min=(-1.0e18), Float max=(1.0e18), Float step=1.0)
Bool   SetPercent (const GadgetPtr &id, const TriState < Float > &tri, Float min=0.0, Float max=100.0, Float step=1.0)
Bool   SetTime (const GadgetPtr &id, const BaseDocument *doc, const TriState < BaseTime > &tri, const BaseTime &min= BaseTime (- 108000, 1), const BaseTime &max= BaseTime (108000, 1), Int32 stepframes=1)
Bool   SetString (const GadgetPtr &id, const TriState < String > &tri, Int32 flags=0)
Bool   Local2Global ( Int32 *x, Int32 *y)
Bool   Global2Local ( Int32 *x, Int32 *y)
Bool   Screen2Local ( Int32 *x, Int32 *y)
Bool   Local2Screen ( Int32 *x, Int32 *y)
Bool   GetColorRGB ( Int32 colorid, Int32 &r, Int32 &g, Int32 &b)
void  SetDefaultColor (const GadgetPtr &id, Int32 colorid, Int32 mapid)
void  SetDefaultColor (const GadgetPtr &id, Int32 colorid, const 向量 &color)
Bool   LoadDialogResource ( Int32 id, GeResource *lr, Int32 flags)
C4DGadget AddCheckbox ( Int32 id, Int32 flags, Int32 initw, Int32 inith, const maxon::String &name)
C4DGadget AddButton ( Int32 id, Int32 flags, Int32 initw, Int32 inith, const maxon::String &name)
C4DGadget AddStaticText ( Int32 id, Int32 flags, Int32 initw, Int32 inith, const maxon::String &name, Int32 borderstyle)
C4DGadget AddArrowButton ( Int32 id, Int32 flags, Int32 initw, Int32 inith, Int32 arrowtype)
C4DGadget AddEditText ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Int32 editflags=0)
C4DGadget AddMultiLineEditText ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Int32 style=0)
C4DGadget AddEditNumber ( Int32 id, Int32 flags, Int32 initw=80, Int32 inith=0)
C4DGadget AddEditNumberArrows ( Int32 id, Int32 flags, Int32 initw=70, Int32 inith=0)
C4DGadget AddEditSlider ( Int32 id, Int32 flags, Int32 initw=80, Int32 inith=0)
C4DGadget AddSlider ( Int32 id, Int32 flags, Int32 initw=90, Int32 inith=0)
C4DGadget AddColorField ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Int32 colorflags=0)
C4DGadget AddColorChooser ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Int32 layoutflags=0, const BaseContainer &settings= BaseContainer ())
C4DGadget AddRadioButton ( Int32 id, Int32 flags, Int32 initw, Int32 inith, const maxon::String &name)
C4DGadget AddRadioText ( Int32 id, Int32 flags, Int32 initw, Int32 inith, const maxon::String &name)
C4DGadget AddEditShortcut ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Int32 shortcutflags=0)
C4DGadget AddSeparatorH ( Int32 initw, Int32 flags= BFH_FIT )
C4DGadget AddSeparatorV ( Int32 inith, Int32 flags= BFV_FIT )
Bool   AddRadioGroup ( Int32 id, Int32 flags, Int32 columns=1, Int32 rows=0)
C4DGadget AddComboBox ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Bool specialalign=false, Bool allowFiltering=false)
C4DGadget AddComboButton ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Bool specialalign=false, Bool allowFiltering=false)
C4DGadget AddPopupButton ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0, Bool allowFiltering=false)
Bool   AddListView ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0)
Bool   LayoutChanged (const GadgetPtr &id)
Bool   LayoutChangedNoRedraw (const GadgetPtr &id)
Bool   激活 (const GadgetPtr &id)
Bool   IsActive (const GadgetPtr &id)
UpdateDialogHelper   BeginLayoutChange (const GadgetPtr &gadget, Bool disableRedraws)
Bool   LayoutFlushGroup (const GadgetPtr &id)
Bool   LayoutFlushDisableRedraw (const GadgetPtr &id, Bool disable)
Bool   RemoveElement (const GadgetPtr &id)
Bool   HideElement (const GadgetPtr &id, Bool hide)
Bool   RestoreLayout ( Int32 pluginid, Int32 subid, void *secret)
Bool   AddChild (const GadgetPtr &id, Int32 subid, const maxon::String &child)
Bool   FreeChildren (const GadgetPtr &id)
Bool   SetPopup (const GadgetPtr &id, const BaseContainer &bc)
Bool   AddChildren (const GadgetPtr &id, const BaseContainer &bc)
C4DGadget AddUserArea ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0)
Bool   AttachUserArea ( GeUserArea &ua, const GadgetPtr &id, USERAREAFLAGS userareaflags= USERAREAFLAGS::COREMESSAGE )
Bool   AddSubDialog ( Int32 id, Int32 flags, Int32 initw=0, Int32 inith=0)
Bool   AttachSubDialog ( SubDialog *userdlg, Int32 id)
Bool   AddDlgGroup ( Int32 type)
Bool   GroupBeginInMenuLine ()
Bool   TabGroupBegin ( Int32 id, Int32 flags, Int32 tabtype= TAB_TABS )
Bool   GroupBegin ( Int32 id, Int32 flags, Int32 cols, Int32 rows, const maxon::String &title, Int32 groupflags, Int32 initw=0, Int32 inith=0)
Bool   GroupEnd (void)
Bool   GroupSpace ( Int32 spacex, Int32 spacey)
Bool   GroupBorder ( UInt32 borderstyle)
Bool   GroupBorderNoTitle ( UInt32 borderstyle)
Bool   GroupBorderSpace ( Int32 left, Int32 top, Int32 right, Int32 bottom)
Bool   GroupWeightsSave (const GadgetPtr &id, BaseContainer &weights)
Bool   GroupWeightsLoad (const GadgetPtr &id, const BaseContainer &weights)
Bool   GetItemDim (const GadgetPtr &id, Int32 *x, Int32 *y, Int32 *w, Int32 *h) const
Bool   GetDragPosition (const BaseContainer &msg, Int32 *x, Int32 *y)
Bool   GetDragObject (const BaseContainer &msg, Int32 *type, void **object)
Bool   SetDragDestination ( Int32 cursor, Int32 gadgetid=0)
Bool   CheckDropArea (const GadgetPtr &id, const BaseContainer &msg, Bool horiz, Bool vert)
Bool   GetVisibleArea ( Int32 scrollgroupid, Int32 *x1, Int32 *y1, Int32 *x2, Int32 *y2)
Bool   SetVisibleArea ( Int32 scrollgroupid, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
Bool   ScrollGroupBegin ( Int32 id, Int32 flags, Int32 scrollflags, Int32 initw=0, Int32 inith=0)
Bool   MenuFlushAll (void)
Bool   MenuSubBegin (const maxon::String &string)
Bool   MenuSubEnd (void)
Bool   MenuAddCommand ( Int32 cmdid)
Bool   MenuAddString ( Int32 id, const maxon::String &string)
Bool   MenuAddSeparator (void)
Bool   MenuFinished (void)
Bool   MenuInitString ( Int32 id, Bool enabled, Bool checked)
Bool   MenuSetResource ( Int32 id)
void *  FindCustomGui ( Int32 id, Int32 pluginid)
void *  AddCustomGui ( Int32 id, Int32 pluginid, const maxon::String &name, Int32 flags, Int32 minw, Int32 minh, const BaseContainer &customdata)
Bool   SetMultiLineMode (const GadgetPtr &id, SCRIPTMODE mode)
Bool   SetMultiLineLock (const GadgetPtr &id, Bool lock)
Bool   SetMultiLinePos (const GadgetPtr &id, Int32 line, Int32 pos)
Bool   CheckClose (void)
Bool   CheckValueRanges (void)
Float   GetPixelRatio () const
Bool   ReleaseLink ()
Bool   CheckCoreMessage (const BaseContainer &msg, Int32 *ownlastcoremsg=nullptr)
void *  GetWindowHandle ()
-  Static Public Member Functions inherited from GeDialog
static void  HandleHelpString (const BaseContainer &msg, BaseContainer &result, const maxon::String &sym)
-  Protected Attributes inherited from GeDialog
Bool   createlayout

Member Enumeration Documentation

◆  anonymous enum

anonymous enum
Enumerator
DontUpdatePreviewBitmap 

For Update() if a custom preview bitmap is used.

构造函数 & 析构函数文档编制

◆  SDKBrowserPreviewDialog()

SDKBrowserPreviewDialog ( )

Constructor.

◆  ~SDKBrowserPreviewDialog()

virtual ~ SDKBrowserPreviewDialog ( )
virtual

Destructor.

成员函数文档编制

◆  Init()

void Init ( SDKBrowserContentNodeRef   content ,
Int32   tab_id  
)

Sets the content node and the active tab.

参数
[in] content The active content node.
[in] tab_id The active tab. See SDKBrowserTab .

◆  Update()

Bool 更新 ( Int32   flags = 0 )

Updates the preview sub-dialog.

参数
[in] flags Pass DontUpdatePreviewBitmap if a custom preview bitmap is used.
返回
true if successful, otherwise false .

◆  AddTab()

Bool AddTab ( Int32   id ,
const String name  
)

Adds an extra tab.

注意
Must be called before CreateLayout() .
参数
[in] id The tab ID to add. See SDKBrowserTab .
[in] name The name of the new tab.
返回
true if successful, otherwise false .

◆  RemoveDefaultTab()

Bool RemoveDefaultTab ( Int32   id )

Remove one of the default tabs ( PreviewTab or InfoTab ).

参数
[in] id The default tab ID to remove. Pass PreviewTab or InfoTab .
返回
true if successful, otherwise false .

◆  LayoutFlushTab()

Bool LayoutFlushTab ( Int32   id )

Flushes the content of one of the default tabs ( PreviewTab or InfoTab ).

参数
[in] id The default tab ID to flush. Pass PreviewTab or InfoTab .
返回
true if successful, otherwise false .

◆  LayoutAddToTab()

Bool LayoutAddToTab ( Int32   id )

Sets the insertion point at the end of one of the default tabs ( PreviewTab or InfoTab ).

参数
[in] id The default tab ID to set the insertion point to. Pass PreviewTab or InfoTab .
返回
true if successful, otherwise false .

◆  LayoutChangedTab()

Bool LayoutChangedTab ( Int32   id )

Calls LayoutChanged() for one of the default tabs ( PreviewTab or InfoTab ).

参数
[in] id The default tab ID to call LayoutChanged() for. Pass PreviewTab or InfoTab .
返回
true if successful, otherwise false .

◆  GetActiveTab()

Int32 GetActiveTab ( void  )

Retrieves the ID of the active tab.

返回
The active tab. See SDKBrowserTab .

◆  ChangePreviewBitmap()

void ChangePreviewBitmap ( BaseBitmap bm ,
Int32   flags = 0  
)

Changes the preview bitmap.

参数
[in] bm The new bitmap.
[in] flags The flags.

◆  CreateLayout()

virtual Bool CreateLayout ( void  )
virtual

Called when the dialog is about to be displayed. Override this method to define the layout of the dialog.
Either use the recommended LoadDialogResource function or the manual functions (for example AddButton() ). See 对话框布局 了解更多信息。

返回
true if successful, otherwise false .

Reimplemented from GeDialog .

◆  InitValues()

virtual Bool InitValues ( void  )
virtual

Called when the dialog is initialized by the GUI. Override this method to initialize local variables and the gadgets used.

另请参阅
The article GUI Messages 了解更多信息。
返回
true if successful, otherwise false .

Reimplemented from GeDialog .

◆  CoreMessage()

virtual Bool CoreMessage ( Int32   id ,
const BaseContainer msg  
)
virtual

Override this method to react to Cinema 4D core messages.

另请参阅
The article Core Messages 了解更多信息。
参数
[in] id The message ID: EVMSG
[in] msg The message container.
返回
Currently not used.

Reimplemented from GeDialog .

◆  Command()

virtual Bool 命令 ( Int32   id ,
const BaseContainer msg  
)
virtual

Whenever the user clicks on a gadget and/or changes its value this function will be called. It is also called when a string menu item is selected. Override this methods to handle such events.

注意
Remember StopAllThreads() must be called before making modifications to the scene.
参数
[in] id The ID of the gadget that triggered the event.
[in] msg The message container. Contains the following values: BFM_ACTION_ID and BFM_ACTION_VALUE .
返回
true if successful, otherwise false .

Reimplemented from GeDialog .

◆  AskClose()

virtual Bool AskClose ( void  )
virtual

If the user wants to close the dialog with the OK button this function will be called. Override it to avoid closing the dialog if an error situation has occurred.
false is returned everything will be as usual, but if true is returned the dialog will not close. This function is especially useful in combination with the GeModalDialog class for handling wrong user input before leaving the dialog.

警告
A buggy function, always returning true , will lead to a frustrating user experience.
返回
true if the dialog should not be closed, false if it should.

Reimplemented from GeDialog .

◆  Timer()

virtual void Timer ( const BaseContainer msg )
virtual

Called when a timer event is received.
To subscribe to timer events use SetTimer() .

参数
[in] msg The timer message container.

Reimplemented from GeDialog .

◆  DestroyWindow()

virtual void DestroyWindow ( void  )
virtual

Called when the dialog is about to be closed temporarily, for example for layout switching.
All pointers to C4DGadget , GeUserArea and SubDialog objects as well as custom GUI objects are invalidated. So set all such stored pointers to nullptr .
CreateLayout will be called when the dialog is restored.

Reimplemented from GeDialog .

◆  Message()

virtual Int32 消息 ( const BaseContainer msg ,
BaseContainer result  
)
virtual

Called when a message is received.
Override this function to react to special messages. Normally this is not necessary.

注意
If overriden, include a call to the base version of this function, SubDialog::Message() .
另请参阅
The article GUI Messages 了解更多信息。
参数
[in] msg The message container.
[in] result A container to place results in.
返回
Depends on the message.

Reimplemented from SubDialog .

Member Data Documentation

◆  private_data

void* private_data private