Ignore:
Timestamp:
Aug 3, 2012, 10:42:13 AM (12 years ago)
Author:
chronos
Message:
  • Added: Registration of file types for modules.
  • Added: Some Brainfuck module sample code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StudioCommon/ULDStudioAPI.pas

    r5 r7  
    66
    77uses
    8   Classes, SysUtils, UModularSystem, ActnList, Menus, Forms;
     8  Classes, SysUtils, UModularSystem, ActnList, Menus, Forms, USource,
     9  SpecializedList;
    910
    1011type
     
    1819    MainForm: TForm;
    1920    MainMenu: TMainMenu;
     21    FileTypes: TFileTypes;
    2022    constructor Create;
    2123    destructor Destroy; override;
    2224
    2325    // API functions
     26    procedure RegisterFileType(FileType: TSourceType);
     27    procedure UnregisterFileType(FileType: TSourceType);
    2428    procedure RegisterForm(Form: TForm);
    2529    procedure UnregisterForm(Form: TForm);
     
    4448  FreeAndNil(Actions);
    4549  inherited Destroy;
     50end;
     51
     52procedure TLDStudioAPI.RegisterFileType(FileType: TSourceType);
     53begin
     54  FileTypes.Add(FileType);
     55end;
     56
     57procedure TLDStudioAPI.UnregisterFileType(FileType: TSourceType);
     58begin
     59  FileTypes.Remove(FileType);
    4660end;
    4761
Note: See TracChangeset for help on using the changeset viewer.