Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Context help system

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 226 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 06/06/2008 at 17:02, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R9-R10.5 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Anybody think that it would be possible to make a help system sort of like Windows where you enable the "?" and select the dialog element to get information? I realize that tooltips are out of the question so I'd probably open a dialog or HTML in a browswer (or something).

      For instance, is it possible to retrieve the gadget ID under which the cursor was clicked (while in this mode that I'd be using)? It seems like one would need to use GetItemDim() for every gadget and check to see if the cursor position is within it.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 07/06/2008 at 00:50, xxxxxxxx wrote:

        Okay. Well, there isn't much to do about specific context (at the gadget level) but it can work at the tab group level nicely. So, here is a complete non-modal dialog class to show HTML help. Create an instance of this class, Open() as needed, and then call SetUrl(string) to show the appropriate HTML help:

        > ////////////////////////////////////////////////////////////////
        > // HelpDialog.cpp
        > ////////////////////////////////////////////////////////////////
        > // interPoser Pro Help Dialog Class
        > ////////////////////////////////////////////////////////////////
        > // V1.8.5 2008.06.07 Robert Templeton
        > ////////////////////////////////////////////////////////////////
        > #ifndef _HELPDIALOG_H_
        > #define _HELPDIALOG_H_
        >
        > #include "customgui_htmlviewer.h"
        >
        > // CLASS: interPoserPro Help Dialog Info
        > class HelpDialog : public GeDialog
        > {
        >      private:
        >           HtmlViewerCustomGui*     hvcg;
        >      public:
        >           //*---------------------------------------------------------------------------*
        >           HelpDialog()
        >           //*---------------------------------------------------------------------------*
        >           {
        >                hvcg =     NULL;
        >           }
        >           // -- GeDialog Virtuals
        >           //*---------------------------------------------------------------------------*
        >           Bool CreateLayout()
        >           //*---------------------------------------------------------------------------*
        >           {
        >                // Call parent instance
        >                if (!GeDialog::CreateLayout())     return FALSE;
        >
        >                // Dialog Title
        >                SetTitle(GeLoadString(IPPS_PLUGIN_NAME)+" "+GeLoadString(IPPS_PLUGIN_EDITION)+" Help");
        >
        >                BaseContainer     tbc;
        >                hvcg =                         (HtmlViewerCustomGui* )AddCustomGui(5000L,CUSTOMGUI_HTMLVIEWER,String(),BFH_SCALEFIT|BFV_SCALEFIT,0L,0L,tbc);
        >                if (!hvcg)                    return ErrorException::Throw(EE_DIALOG, GeLoadString(IPPERR_MEMORY_TEXT), "HelpDialog.CreateLayout.hvcg");
        >
        >                return TRUE;
        >           }
        >           // -- General
        >           //*---------------------------------------------------------------------------*
        >           void SetUrl(const String& url)
        >           //*---------------------------------------------------------------------------*
        >           {
        >                if (!hvcg)     return;
        >                hvcg->SetUrl(url, URL_ENCODING_UTF16);
        >                hvcg->DoAction(WEBPAGE_REFRESH);
        >           }
        > };
        >
        > #endif     // _HELPDIALOG_H_

        Here is the general template for when a 'help' button is pushed:

        >      if          (tab == GROUP_RTEXPLORER)                    ShowHelpDialog("http://www.kuroyumes-developmentzone.com/");
        > ...
        > //*---------------------------------------------------------------------------*
        > void IPPDialog::ShowHelpDialog(const String& url)
        > //*---------------------------------------------------------------------------*
        > {
        >      if (!helpDialog->IsOpen())     helpDialog->Open(TRUE,0L,-1L,-1L,320L,320L);
        >      helpDialog->SetUrl(url);
        > }
        >

        Note that this feature is only available in R10 and later.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post