Jump to content

Search the Community

Showing results for tags 'rfc'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. baka0815

    GExperts Favorites as WP-Plugin

    I'm currently experimenting with the ToolsAPI.WelcomePage API a bit and created a plugin for the GExperts favorites. My current work is a bit hacky, therefore there is currently no patch or something. I include the ToolsAPI.WelcomePage unit in the GX_FavFiles and have a separate type for the plugin there: TGXWelcomePagePlugin = class(TInterfacedObject, INTAWelcomePagePlugin, INTAWelcomePageContentPluginCreator) private FIconIndex: Integer; FView: TFrame; FFavoriteFilesExpert: TFavoriteFilesExpert; public constructor Create(const AFavoriteFilesExpert: TFavoriteFilesExpert); destructor Destroy; override; { INTAWelcomePagePlugin } function GetPluginID: string; function GetPluginName: string; function GetPluginVisible: Boolean; { INTAWelcomePageContentPluginCreator } function GetView: TFrame; function CreateView: TFrame; procedure DestroyView; function GetIcon: TGraphicArray; function GetIconIndex: Integer; procedure SetIconIndex(const Value: Integer); end; The AfterIDEInitialized procedure calls the creation of the plugin via the RegisterWelcomePage method. This does not work on first try, so there is a timer to catch the moment the WelcomePagePluginService is finally availabe. If anyone knows of a different way to register the plugin, please let me know! A dedicated, global "Register" procedure as used for BPL-Plugins didn't work. procedure TFavoriteFilesExpert.RegisterWelcomePage(Sender: TObject); begin // The WelcomePagePluginService might not be initialized the first time we get here, // so try again at a later time. if not Assigned(WelcomePagePluginService) then begin if (not Assigned(FPluginTimer)) then begin FPluginTimer := TTimer.Create(nil); FPluginTimer.OnTimer := RegisterWelcomePage; FPluginTimer.Interval := 2000; end; FPluginTimer.Enabled := True; end else begin FPluginTimer.Enabled := False; if (Assigned(FPluginTimer)) then FreeAndNil(FPluginTimer); WelcomePagePluginService.RegisterPluginCreator(TGXWelcomePagePlugin.Create(Self)); end; end; The welcome page gets the favorites expert as a parameter to be able to access the options (it may be sufficient to just pass the options). Then in the CreateView method I create a TfmFavFiles form and "steal" the tvFolders and pnlFiles objects and change the parent to the plugin view. function TGXWelcomePagePlugin.CreateView: TFrame; var FavFiles: TfmFavFiles; begin if not Assigned(FView) then begin FView := WelcomePagePluginService.CreateCaptionFrame(sPluginID, sPluginName, nil); FavFiles := TfmFavFiles.Create(nil, FFavoriteFilesExpert.FOptions); FavFiles.tvFolders.Parent := FView; FavFiles.pnlFiles.Parent := FView; end; Result := FView; end; This works form me, but is not in a state that I would like to upstream the work, so any input is greatly appreciated!
×