diff --git a/editor/studio/plugins/Functions and Events-Dateien/filelist.xml b/editor/studio/plugins/Functions and Events-Dateien/filelist.xml new file mode 100644 index 00000000..c1baa3d6 --- /dev/null +++ b/editor/studio/plugins/Functions and Events-Dateien/filelist.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/editor/studio/plugins/Functions and Events-Dateien/sheet001.htm b/editor/studio/plugins/Functions and Events-Dateien/sheet001.htm new file mode 100644 index 00000000..bb5ad15b --- /dev/null +++ b/editor/studio/plugins/Functions and Events-Dateien/sheet001.htm @@ -0,0 +1,664 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Functions + for AMXX-Studio
MessageDataIntDataDescription
SCM_SHOWPROGRESS-ReadOnly (0/1)Shows the progress panel
SCM_HIDEPROGRESS--Hides the progress panel
SCM_UPDATEPROGRESSProgress captionPositionSets the current progress
SCM_LOADCODESNIPPETSLanguage-Loads the Code-Snippets of a language
SCM_MIRC_CMDCommand-Performs a command in mIRC
SCM_RELOADINI--Reloads the ini configuration (Hint: the ini configuration is not the + whole config!)
SCM_SELECTLANGUAGELanguage-Sets the highlighter for your active document
SCM_LOADFILEFile-Loads a file
SCM_CURRPROJECTS--Returns the index of the current projects
SCM_COMPILE--Compiles the active document (only Pawn supported)
SCM_COMPILE_UPLOAD--Compiles the active document (only Pawn supported) and uploads the output
SCM_COMPILE_STARTHL--Compiles the active document (only Pawn supported) and starts Half-Life
SCM_MENU_LOADIMAGEFilename-Loads a bitmap and returns the image index
SCM_MENU_ADDITEMCategory->CaptionImage IndexAdds an item to the menu
SCM_MENU_ADDSUBITEMCategory->ItemImage IndexAdds a subitem to the menu
SCM_MENU_FAKECLICKCaption-Simulates a click on the item
SCM_MENU_SHOWITEMCaption-Shows a menu item
SCM_MENU_HIDEITEMCaption-Hides a menu item
SCM_PLUGIN_LOADFile in .\plugins\or Plugin IndexLoads a plugin
SCM_PLUGIN_UNLOADFile in .\plugins\or Plugin IndexUnloads a plugin
SCM_SETTINGS_CREATEPAGECaption-Creates a new page in the Settings dialog
SCM_SETTINGS_REMOVEPAGECaption-Removes a page from the Settings dialog
SCM_CODEINSPECTOR_CLEAR--Clears the code-inspector
SCM_CODEINSPECTOR_ADDName\nCategory\nValue-Adds a new item to the code-inspector
SCM_CODEINSPECTOR_ADDCOMBOName\nCategory\nValue\nValues-Adds a new combobox-item to the code-inspector
SCM_CODEINSPECTOR_SETVALUEName\nValue-Sets the value of an item in the code-inspector
SCM_CODEINSPECTOR_SETNAMEName\nNewName-Sets the name of an item in the code-inspector
SCM_CODEINSPECTOR_GETVALUEName-Gets the value of an item in the code-inspector
SCM_CODEINSPECTOR_GETNAMEValue-Gets the name of an item in the code-inspector
SCM_CODEINSPECTOR_COUNT--Returns the number of items in the code-inspector
SCM_CODEINSPECTOR_BEGINUPDATE--It's recommended to use this before you update the whole code-inspector
SCM_CODEINSPECTOR_ENDUPDATE--Use this when you've finished the update in the code-inspector
SCM_CODEINSPECTOR_DELETEName-Deletes an item in the code-inspector
SCM_PAWN_NEWFILEFilename-Adds a new file to the Pawn Projects
SCM_PAWN_SAVEFILE[Filename]IndexSaves a Pawn file
SCM_PAWN_CLOSEFILE-IndexCloses a file in the Pawn Projects
SCM_PAWN_ISUNTITLED-IndexReturns 1 if Pawn document is untitled, otherwise 0
SCM_PAWN_ACTIVATE--Activates the Pawn Projects
SCM_PAWN_ACTIVATEDOCFlagsIndexActivates a document in the Pawn Projects (Flags: r = Resore caret, s = + Save last document)
SCM_PAWN_GETNOTES-IndexGets the notes of a Pawn document as RTF
SCM_PAWN_SETNOTESNotesIndexSets the notes of a Pawn document
SCM_PAWN_GETFILENAME-IndexReturns the filename of a Pawn document as integer
SCM_PAWN_SETFILENAMEFilenameIndexSets the filename of a file (only in AMXX-Studio)
SCM_PAWN_FILECOUNT--Returns the number of loaded Pawn scripts
SCM_PAWN_GETTEXT-IndexReturns the text of a Pawn document as integer
SCM_CPP_NEWFILEFilename-Creates a new C++ file
SCM_CPP_SAVEFILE[Filename]IndexSaves a C++ file
SCM_CPP_CLOSEFILE-IndexCloses a C++ file
SCM_CPP_ISUNTITLED-IndexReturns 1 if Pawn document is untitled, otherwise 0
SCM_CPP_ACTIVATE--Activates the C++ Projects
SCM_CPP_ACTIVATEDOCFlagsIndexActivates a document in the C++ Projects (Flags: r = Resore caret, s = + Save last document)
SCM_CPP_ACTIVATEIDE-Enable (0/1)Activate the C++ IDE  
SCM_CPP_GETNOTES-IndexGets the notes of a C++ document as RTF
SCM_CPP_SETNOTESNotesIndexSets the notes of a C++ document
SCM_CPP_GETFILENAME-IndexReturns the filename of a C++ document as integer
SCM_CPP_SETFILENAMEFilenameIndexSets the filename of a file (only in AMXX-Studio)
SCM_CPP_FILECOUNT--Returns the number of loaded C(++) files
SCM_OTHER_NEWFILEFilename-Creates a new file
SCM_OTHER_SAVEFILE[Filename]IndexSaves a file
SCM_OTHER_CLOSEFILE-IndexCloses a file
SCM_OTHER_ISUNTITLED-IndexReturns 1 if the document is untitled, otherwise 0
SCM_OTHER_ACTIVATE--Activates the Other Projects
SCM_OTHER_ACTIVATEDOCFlagsIndexActivates a document in the Other Projects (Flags: r = Resore caret, s = + Save last document)
SCM_OTHER_GETNOTES-IndexGets the notes of a document as RTF
SCM_OTHER_SETNOTESNotesIndexSets the notes of a document
SCM_OTHER_GETFILENAME-IndexReturns the filename of a file
SCM_OTHER_SETFILENAMEFilenameIndexSets the filename of a file (only in AMXX-Studio)
SCM_OTHER_FILECOUNT--Returns the number of loaded textfiles
SCM_OUTPUT_SHOW--Shows the ouput list
SCM_OUTPUT_HIDE--Hides the output list
SCM_OUTPUT_ADDItem-Adds an item to the output list
SCM_OUTPUT_CLEAR--Clears the output list
SCM_OUTPUT_DELETE-Item IndexDeletes an item in the output list
SCM_OUTPUT_GETTEXT--Returns the output list as integer
SCM_OUTPUT_GETITEM-Item IndexReturns an output item as integer
SCM_OUTPUT_INDEXOFItem-Returns the index of an item in the output list
SCM_ACTIVE_DOCUMENT--Returns the index of the active document
SCM_ACTIVE_PROJECTS--Returns the index of the active projects
SCM_EDITOR_SETTEXTText-Sets the text of the editor
SCM_EDITOR_GETTEXT--Returns the text of the editor as integer
SCM_EDTIOR_SETCALLTIPSCalltips-Sets the calltips
SCM_EDITOR_SHOWCALLTIPDefinitionPositionShows a calltip
SCM_EDITOR_SETAUTOCOMPLETEList-Sets the autocomplete list
SCM_EDITOR_SHOWAUTOCOMPLETEListLength EnteredShows the autocomplete list
SCM_EDITOR_GETSELSTART--Returns the current selection start
SCM_EDTIOR_GETSELLENGTH--Returns the current selection length
SCM_EDITOR_SETSELSTART-Selection StartSets the selection start
SCM_EDITOR_SETSELLENGH-Selection LengthSets the selection length
SCM_REMOVE_MENUITEMCaption-Removes a menu item
SCM_REMOVE_IMAGE-Image IndexRemoves an image from the image list
SCM_SETTHEMETheme-Sets the current theme
SCM_GETTHEME--Returns the current theme as integer
All + functions should be called with SendStudioMsg(Message, Data, IntData). Each + "normal" function returns 1 on succeed, othwise 0.
+ + + + diff --git a/editor/studio/plugins/Functions and Events-Dateien/sheet002.htm b/editor/studio/plugins/Functions and Events-Dateien/sheet002.htm new file mode 100644 index 00000000..72281e42 --- /dev/null +++ b/editor/studio/plugins/Functions and Events-Dateien/sheet002.htm @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Events + for AMXX-Studio
EventParameters ( C )Parameters ( Delphi )Description
AppMessageHWND pHwnd; int pMessage; int pWParam; int pLParam; int pTime; POINT pPtpHwnd: HWND; pMessage: Integer; pWParam, pLParam: Integer; pTime: + Integer; pPt: TPointCalled when a message has been sent to the application
AutoCompleteSelectCHAR *pTextpText: PCharCalled when an item in the autocomplete list has been selected
AutoCompleteShowCHAR *pListpList: PCharCalled when the autocomplete list is being shown
CallTipClickint pPositionpPosition: IntegerCalled when a click on the calltip has been performed
CallTipShowCHAR *pListpList: PCharCalled when a calltip is being shown
Click--Called when a click on the editor has been performed
CodeSnippetClickCHAR *pTitle; CHAR *pCategory; CHAR *pCodepTitle, pCategory: PChar; pCode: PCharCalled when a click on a code-snippet has been performed
Compileint pCompileType; CHAR *Lang; CHAR *FilenamepCompileType: Integer; Lang, Filename: PCharCalled after a document has been compiled
Compilingint pCompileType; CHAR *Lang; CHAR *FilenamepCompileType: Integer; Lang, Filename: PCharCalled right before a document is being compiled
CreatedNewFilebyte ItemItem: ByteCalled after a document has been created (only called on a menu click)
CreatingNewFilebyte ItemItem: ByteCalled right before a document is being created (only called on a menu + click)
CustomItemClickCHAR *pCaptionpCaption: PCharCalled when a click on a custom menu item has been performed
DisplayingSearchCHAR *pExpression; CHAR *pSearchList; BOOL pCaseSensivity;BOOL + pWholeWords; pSearchFromCaret; BOOL pSelectedOnly; BOOL pRegEx; BOOL pForwardpExpression, pSearchList: PChar; pCaseSensivity, pWholeWords, + pSearchFromCaret, pSelectedOnly, pRegEx, pForward: BooleanCalled when the Search-Dialog is being shown
DocChangedint pIndex; CHAR *pFilename; CHAR *pHighlighter; BOOL pRestoreCaretpIndex: Integer; pFilename: PChar; pHighlighter: PChar; pRestoreCaret: + BooleanCalled when the active document has changed
DocChangingint pIndex; CHAR *pFilename; CHAR *pHighlighter; BOOL pRestoreCaretpIndex: Integer; pFilename: PChar; pHighlighter: PChar; pRestoreCaret: + BooleanCalled before the active document changes
KeyPressCHAR *pKeypKey: PCharCalled when a key has been pressed in the editor
LoadedCHAR *pFilenamepFilename: PCharCalled after a document has been opened
LoadingCHAR *pFilenamepFilename: PCharCalled when a new document is being loaded
ModifiedCHAR *pModifiedTextpModifiedText: PCharCalled when the code has been changed
OutputDoubleClickint pItemIndexpItemIndex: IntegerCalled when a double-click on the output list has been performed
OutputPopupint pItemIndexpItemIndex: IntegerCalled when the popup-menu of the output-list is being shown
PluginLoadload_info *LoadInfoLoadInfo: PLoadInfoCalled when the plugin is being loaded. Register menu items etc. here
PluginUnload--Called when the plugin is being unloaded. Remove registered objects here.
ProjectsChangedint pOldIndex; int pNewIndexpOldIndex, pNewIndex: IntegerCalled after the active projects have been changed
ProjectsChangingint pOldIndex; int pNewIndexpOldIndex, pNewIndex: IntegerCalled when the active projects change
SavedCHAR *pFilenamepFilename: PCharCalled after a document has been saved
SavingCHAR *pFilenamepFilename: PCharCalled when a document is being saved
SearchCHAR *pExpression; CHAR *pSearchList; BOOL pCaseSensivity;BOOL + pWholeWords; pSearchFromCaret; BOOL pSelectedOnly; BOOL pRegEx; BOOL pForwardpExpression, pSearchList: PChar; pCaseSensivity, pWholeWords, + pSearchFromCaret, pSelectedOnly, pRegEx, pForward: BooleanCalled when an expression is being searched
SearchAgainCHAR *pExpression; CHAR *pSearchList; BOOL pCaseSensivity;BOOL + pWholeWords; pSearchFromCaret; BOOL pSelectedOnly; BOOL pRegEx; BOOL pForwardpExpression, pSearchList: PChar; pCaseSensivity, pWholeWords, + pSearchFromCaret, pSelectedOnly, pRegEx, pForward: BooleanCalled when the user searches again an expression
SearchReplaceCHAR *pExpression; CHAR *pReplace; CHAR pExpList; CHAR *pRepList; BOOL + pCaseSensivity; BOOL pWholeWords; BOOL pSearchFromCaret; BOOL pSelectedOnly; + BOOL pRegEx; BOOL pForwardpExpression, pReplace, pExpList, pRepList: PChar; pCaseSensivity, + pWholeWords, pSearchFromCaret, pSelectedOnly, pRegEx, pForward: BooleanCalled when an expression is being replaced
Shortcutint pCharCode; int KeyDatapCharCode, pKeyData: IntegerCalled when a shortcut is being pressed
ShowHelpint pHelpTypepHelpType: IntegerCalled when the help is being opened
ThemeChangedCHAR *pThemepTheme: PCharCalled after the current theme has changed
UpdatedCodeExplorerCHAR *pLang; CHAR *pFilename; CHAR *pCurrProjectspLang, pFilename, pCurrProjects: PCharCalled after the code-explorer has been updated
UpdatedCodeInspectorCHAR *pLang; CHAR *pFilename; CHAR *pCurrProjectspLang, pFilename, pCurrProjects: PCharCalled after the code-inspector has been updated
UpdateSelint pSelStart; int pSelLength; int pFirstVisibleLinepSelStart, pSelLength, pFirstVisibleLine: IntegerCalled when the selection has been changed
UpdatingCodeExplorerCHAR *pLang; CHAR *pFilename; CHAR *pCurrProjectspLang, pFilename, pCurrProjects: PCharCalled when the code-explorer updates
UpdatingCodeInspectorCHAR *pLang; CHAR *pFilename; CHAR *pCurrProjectspLang, pFilename, pCurrProjects: PCharCalled when the code-inspector is being updated
VisibleControlChangeint pControl; BOOL pShowpControl: Integer; pShow: BooleanCalled when a visible control has been hidden or shown
You should + implement these events in this style:
Delphi: + function CustomItemClick(Caption: PChar): Integer; cdecl;
C: EXPORT + int CustomItemClick(CHAR *Caption)
All events + should return PLUGIN_CONTINUE, PLUGIN_HANDLED or PLUGIN_STOP
+ + + + diff --git a/editor/studio/plugins/Functions and Events-Dateien/stylesheet.css b/editor/studio/plugins/Functions and Events-Dateien/stylesheet.css new file mode 100644 index 00000000..f283e801 --- /dev/null +++ b/editor/studio/plugins/Functions and Events-Dateien/stylesheet.css @@ -0,0 +1,75 @@ +tr + {mso-height-source:auto;} +col + {mso-width-source:auto;} +br + {mso-data-placement:same-cell;} +.style0 + {mso-number-format:General; + text-align:general; + vertical-align:bottom; + white-space:nowrap; + mso-rotate:0; + mso-background-source:auto; + mso-pattern:auto; + color:windowtext; + font-size:10.0pt; + font-weight:400; + font-style:normal; + text-decoration:none; + font-family:Arial; + mso-generic-font-family:auto; + mso-font-charset:0; + border:none; + mso-protection:locked visible; + mso-style-name:Standard; + mso-style-id:0;} +td + {mso-style-parent:style0; + padding-top:1px; + padding-right:1px; + padding-left:1px; + mso-ignore:padding; + color:windowtext; + font-size:10.0pt; + font-weight:400; + font-style:normal; + text-decoration:none; + font-family:Arial; + mso-generic-font-family:auto; + mso-font-charset:0; + mso-number-format:General; + text-align:general; + vertical-align:bottom; + border:none; + mso-background-source:auto; + mso-pattern:auto; + mso-protection:locked visible; + white-space:nowrap; + mso-rotate:0;} +.xl24 + {mso-style-parent:style0; + font-weight:700; + font-family:Arial, sans-serif; + mso-font-charset:0; + text-align:center;} +.xl25 + {mso-style-parent:style0; + text-decoration:underline; + text-underline-style:single; + font-family:Arial, sans-serif; + mso-font-charset:0; + text-align:center;} +.xl26 + {mso-style-parent:style0; + text-align:center;} +.xl27 + {mso-style-parent:style0; + font-family:Arial, sans-serif; + mso-font-charset:0;} +.xl28 + {mso-style-parent:style0; + text-align:center;} +.xl29 + {mso-style-parent:style0; + text-align:left;} diff --git a/editor/studio/plugins/Functions and Events-Dateien/tabstrip.htm b/editor/studio/plugins/Functions and Events-Dateien/tabstrip.htm new file mode 100644 index 00000000..e92ebb07 --- /dev/null +++ b/editor/studio/plugins/Functions and Events-Dateien/tabstrip.htm @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + +
 Functions  Events 
+ + diff --git a/editor/studio/plugins/Functions and Events.htm b/editor/studio/plugins/Functions and Events.htm new file mode 100644 index 00000000..9aeecd89 --- /dev/null +++ b/editor/studio/plugins/Functions and Events.htm @@ -0,0 +1,344 @@ + + + + + + + + + + + + + + + + + + + + + + + + + <body> + <p>Diese Seite verwendet Frames. Frames werden von Ihrem Browser aber nicht unterstützt.</p> + </body> + + + diff --git a/editor/studio/plugins/Hello World - CPP.dll b/editor/studio/plugins/Hello World - CPP.dll new file mode 100644 index 00000000..4c1a18ee Binary files /dev/null and b/editor/studio/plugins/Hello World - CPP.dll differ diff --git a/editor/studio/plugins/Hello World - Delphi.dll b/editor/studio/plugins/Hello World - Delphi.dll new file mode 100644 index 00000000..5522368d Binary files /dev/null and b/editor/studio/plugins/Hello World - Delphi.dll differ diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.dsp b/editor/studio/plugins/Hello_World CPP/Hello_World.dsp new file mode 100644 index 00000000..699f376c --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/Hello_World.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="Hello_World" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=Hello_World - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "Hello_World.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "Hello_World.mak" CFG="Hello_World - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "Hello_World - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "Hello_World - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Hello_World - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 + +!ELSEIF "$(CFG)" == "Hello_World - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "Hello_World - Win32 Release" +# Name "Hello_World - Win32 Debug" +# Begin Group "Quellcodedateien" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\sample.cpp +# End Source File +# End Group +# Begin Group "Header-Dateien" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\sample.h +# End Source File +# Begin Source File + +SOURCE=.\studio_api.h +# End Source File +# End Group +# Begin Group "Ressourcendateien" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.dsw b/editor/studio/plugins/Hello_World CPP/Hello_World.dsw new file mode 100644 index 00000000..488a64a6 --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/Hello_World.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! + +############################################################################### + +Project: "Hello_World"=".\Hello_World.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.opt b/editor/studio/plugins/Hello_World CPP/Hello_World.opt new file mode 100644 index 00000000..3a7c254c Binary files /dev/null and b/editor/studio/plugins/Hello_World CPP/Hello_World.opt differ diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.plg b/editor/studio/plugins/Hello_World CPP/Hello_World.plg new file mode 100644 index 00000000..4e002d0e --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/Hello_World.plg @@ -0,0 +1,33 @@ + + +
+

Erstellungsprotokoll

+

+--------------------Konfiguration: Hello_World - Win32 Release-------------------- +

+

Befehlszeilen

+Erstellen der temporären Datei "C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSP9.tmp" mit Inhalten +[ +/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /Fp"Release/Hello_World.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"C:\Dokumente und Einstellungen\Basic-Master\Eigene Dateien\Programmieren\AMXX-Studio\plugins\Hello_World CPP\sample.cpp" +] +Creating command line "cl.exe @"C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSP9.tmp"" +Erstellen der temporären Datei "C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSPA.tmp" mit Inhalten +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/Hello_World.pdb" /machine:I386 /out:"Release/Hello_World.dll" /implib:"Release/Hello_World.lib" +".\Release\sample.obj" +] +Erstellen der Befehlzeile "link.exe @"C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSPA.tmp"" +

Ausgabefenster

+Kompilierung läuft... +sample.cpp +Linker-Vorgang läuft... + Bibliothek Release/Hello_World.lib und Objekt Release/Hello_World.exp wird erstellt + + + +

Ergebnisse

+Hello_World.dll - 0 Fehler, 0 Warnung(en) +
+ + diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.sln b/editor/studio/plugins/Hello_World CPP/Hello_World.sln new file mode 100644 index 00000000..e7215c05 --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/Hello_World.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello_World", "Hello_World.vcproj", "{A6E5B144-7439-4F23-A679-B6E8B42B606E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A6E5B144-7439-4F23-A679-B6E8B42B606E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A6E5B144-7439-4F23-A679-B6E8B42B606E}.Debug|Win32.Build.0 = Debug|Win32 + {A6E5B144-7439-4F23-A679-B6E8B42B606E}.Release|Win32.ActiveCfg = Release|Win32 + {A6E5B144-7439-4F23-A679-B6E8B42B606E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.suo b/editor/studio/plugins/Hello_World CPP/Hello_World.suo new file mode 100644 index 00000000..9db80da5 Binary files /dev/null and b/editor/studio/plugins/Hello_World CPP/Hello_World.suo differ diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.vcproj b/editor/studio/plugins/Hello_World CPP/Hello_World.vcproj new file mode 100644 index 00000000..b80b5272 --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/Hello_World.vcproj @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/editor/studio/plugins/Hello_World CPP/Hello_World.vcproj.PC-BASIC.Basic-Master.user b/editor/studio/plugins/Hello_World CPP/Hello_World.vcproj.PC-BASIC.Basic-Master.user new file mode 100644 index 00000000..2509dd8f --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/Hello_World.vcproj.PC-BASIC.Basic-Master.user @@ -0,0 +1,65 @@ + + + + + + + + + + + diff --git a/editor/studio/plugins/Hello_World CPP/sample.cpp b/editor/studio/plugins/Hello_World CPP/sample.cpp new file mode 100644 index 00000000..33b40231 --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/sample.cpp @@ -0,0 +1,26 @@ +#include "sample.h" +#include "studio_api.h" +#include +#include +#include + + +EXPORT void PluginLoad(load_info *LoadInfo) { + LoadInfo->sPluginName = "C(++) Example"; // Set PlugIn-name + LoadInfo->sPluginDescription = "Simple example for creating plugins with C(++)"; // Set description + SendStudioMsg(SCM_MENU_ADDITEM, "Tools->Hello World! [C++]", -1); // Register menu items + /* [...] */ +} + +EXPORT void PluginUnload() { + SendStudioMsg(SCM_REMOVE_MENUITEM, "Hello World! [C++]", 0); +} + +EXPORT int CustomItemClick(CHAR *Caption) { + if (strcmp(Caption, "Hello World! [C++]") == 0) { // If caption is equal set text and return PLUGIN_HANDLED + SendStudioMsg(SCM_EDITOR_SETTEXT, "Hello World!\n\nThis is an example for C(++) plugins for AMXX-Studio.", 0); + return PLUGIN_HANDLED; + } + else + return PLUGIN_CONTINUE; +} \ No newline at end of file diff --git a/editor/studio/plugins/Hello_World CPP/sample.h b/editor/studio/plugins/Hello_World CPP/sample.h new file mode 100644 index 00000000..a86a1cbe --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/sample.h @@ -0,0 +1,9 @@ +#ifndef _MYPLUGIN_INCLUDE_H +#define _MYPLUGIN_INCLUDE_H + +#include "studio_api.h" + +EXPORT void PluginLoad(load_info *pInfo); +EXPORT void PluginUnload(); + +#endif //_MYPLUGIN_INCLUDE_H \ No newline at end of file diff --git a/editor/studio/plugins/Hello_World CPP/studio_api.h b/editor/studio/plugins/Hello_World CPP/studio_api.h new file mode 100644 index 00000000..f7fb0a01 --- /dev/null +++ b/editor/studio/plugins/Hello_World CPP/studio_api.h @@ -0,0 +1,195 @@ +/* studio_api.h by the AMX Mod X Dev Team */ + +#ifndef _INCLUDE_STUDIO_H +#define _INCLUDE_STUDIO_H + +#define WINDOWS_LEAN_AND_MEAN +#include +#include + +// DLL Export +#define EXPORT extern "C" __declspec(dllexport) +// Return values for functions +#define PLUGIN_CONTINUE 0 +#define PLUGIN_STOP 1 +#define PLUGIN_HANDLED 2 +// Important values for events +#define COMP_DEFAULT 0 +#define COMP_STARTHL 1 +#define COMP_UPLOAD 2 +#define HELP_DEFAULT 0 +#define HELP_SEARCH 1 +#define HELP_FORUMS 2 +#define HELP_ABOUT 3 +#define CTRL_OUTPUT 0 // Output list +#define CTRL_CODETOOLS_MAIN 1 // Code-Tools window +#define CTRL_CODETOOLS_ITEM 2 // Code-Tools tab +#define CTRL_NOTES 3 // Notes tab +#define NEW_PAWN_PLUGIN 0 +#define NEW_PAWN_EMPTYPLUGIN 1 +#define NEW_PAWN_HEADER 2 +#define NEW_CPP_MODULE 3 +#define NEW_CPP_UNIT 4 +#define NEW_CPP_HEADER 5 +#define NEW_OTHER_TEXTFILE 6 +#define NEW_OTHER_HTML 7 +#define NEW_OTHER_SQL 8 +#define NEW_OTHER_XML 9 + +// Messages (see "Functions and Events.txt" for further information) +#define SCM_SHOWPROGRESS WM_USER + 0x100 // Show progressbar +#define SCM_HIDEPROGRESS WM_USER + 0x101 // Hide progressbar +#define SCM_UPDATEPROGRESS WM_USER + 0x102 // Update progress +#define SCM_LOADCODESNIPPETS WM_USER + 0x103 // Load Code-Snippets of a language +#define SCM_CODESNIPPETCLICK WM_USER + 0x104 // Simulate click on a Code-Snippet +#define SCM_MIRC_CMD WM_USER + 0x105 // Send a command to mIRC (like /msg #amxmodx hello) +#define SCM_RELOADINI WM_USER + 0x106 // Reload configuration ini (Hint: This is not the whole configuration!) +#define SCM_SELECTLANGUAGE WM_USER + 0x107 // Set the highlighter language of the active document +#define SCM_LOADFILE WM_USER + 0x108 // Load a custom file +#define SCM_CURRPROJECTS WM_USER + 0x109 // Returns the current projects index +#define SCM_COMPILE WM_USER + 0x110 // Simulate click on the "Compile"-button +#define SCM_COMPILE_UPLOAD WM_USER + 0x111 // Simulate click on the "Compile and upload"-button +#define SCM_COMPILE_STARTHL WM_USER + 0x112 // Simulate click on the "Compile and Start HL"-button +#define SCM_MENU_LOADIMAGE WM_USER + 0x113 // Load an image (bitmap), returns the image index +#define SCM_MENU_ADDITEM WM_USER + 0x114 // Add a menu item +#define SCM_MENU_ADDSUBITEM WM_USER + 0x115 // Add a submenu item +#define SCM_MENU_FAKECLICK WM_USER + 0x116 // Fake a click on a custom menu item +#define SCM_MENU_SHOWITEM WM_USER + 0x117 // Show an item +#define SCM_MENU_HIDEITEM WM_USER + 0x118 // Hide an item +#define SCM_PLUGIN_LOAD WM_USER + 0x119 // Load a plugin +#define SCM_PLUGIN_UNLOAD WM_USER + 0x120 // Unload a plugin +#define SCM_SETTINGS_CREATEPAGE WM_USER + 0x121 // Create a new settings-page, returns the new HWND +#define SCM_SETTINGS_REMOVEPAGE WM_USER + 0x194 // Removes a page from the settings dialog +#define SCM_CODEINSPECTOR_CLEAR WM_USER + 0x122 // Clear the code-inspector +#define SCM_CODEINSPECTOR_ADD WM_USER + 0x123 // Add a field to the code-inspector +#define SCM_CODEINSPECTOR_ADDCOMBO WM_USER + 0x124 // Add a combobox-item to the code-inspector +#define SCM_CODEINSPECTOR_SETVALUE WM_USER + 0x125 // Set a field of the code-inspector +#define SCM_CODEINSPECTOR_SETNAME WM_USER + 0x126 // Set the name of an item +#define SCM_CODEINSPECTOR_GETVALUE WM_USER + 0x127 // Get the value of an item +#define SCM_CODEINSPECTOR_GETNAME WM_USER + 0x128 // Get the name of an item +#define SCM_CODEINSPECTOR_COUNT WM_USER + 0x129 // Gets the count +#define SCM_CODEINSPECTOR_BEGINUPDATE WM_USER + 0x130 // Begin update +#define SCM_CODEINSPECTOR_ENDUPDATE WM_USER + 0x131 // End update +#define SCM_CODEINSPECTOR_DELETE WM_USER + 0x132 // Deletes a field in the code-inspector + +#define SCM_PAWN_NEWFILE WM_USER + 0x133 // Create new Pawn-file +#define SCM_PAWN_SAVEFILE WM_USER + 0x134 // Save a Pawn-file +#define SCM_PAWN_CLOSEFILE WM_USER + 0x135 // Close a Pawn-file +#define SCM_PAWN_ISUNTITLED WM_USER + 0x136 // Returns 1 if untitled, otherwise 0 +#define SCM_PAWN_ACTIVATE WM_USER + 0x137 // Activate the Pawn Projects +#define SCM_PAWN_ACTIVATEDOC WM_USER + 0x138 // Activate a Pawn document +#define SCM_PAWN_GETNOTES WM_USER + 0x139 // Gets the notes text (RTF) +#define SCM_PAWN_SETNOTES WM_USER + 0x140 // Set the notes text (RTF) +#define SCM_PAWN_GETFILENAME WM_USER + 0x141 // Gets the filename of a document +#define SCM_PAWN_SETFILENAME WM_USER + 0x142 // Sets the filename +#define SCM_PAWN_FILECOUNT WM_USER + 0x195 // Returns the number of loaded scripts +#define SCM_PAWN_GETTEXT WM_USER + 0x143 // Gets the text of a document +#define SCM_PAWN_SETTEXT WM_USER + 0x144 // Sets the text of a document + +#define SCM_CPP_NEWFILE WM_USER + 0x145 // Create new Pawn-file +#define SCM_CPP_SAVEFILE WM_USER + 0x146 // Save a Pawn-file +#define SCM_CPP_CLOSEFILE WM_USER + 0x147 // Close a Pawn-file +#define SCM_CPP_ISUNTITLED WM_USER + 0x148 // Returns 1 if untitled, otherwise 0 +#define SCM_CPP_ACTIVATE WM_USER + 0x149 // Activate the Pawn Projects +#define SCM_CPP_ACTIVATEDOC WM_USER + 0x150 // Activate a Pawn document +#define SCM_CPP_ACTIVATEIDE WM_USER + 0x151 // Activate the C++ IDE +#define SCM_CPP_GETNOTES WM_USER + 0x152 // Gets the notes text (RTF) +#define SCM_CPP_SETNOTES WM_USER + 0x153 // Set the notes text (RTF) +#define SCM_CPP_GETFILENAME WM_USER + 0x154 // Gets the filename of a document +#define SCM_CPP_SETFILENAME WM_USER + 0x155 // Sets the filename +#define SCM_CPP_FILECOUNT WM_USER + 0x196 // Returns the number of loaded C(++) files +#define SCM_CPP_GETTEXT WM_USER + 0x156 // Gets the text of a document +#define SCM_CPP_SETTEXT WM_USER + 0x157 // Sets the text of a document + +#define SCM_OTHER_NEWFILE WM_USER + 0x158 // Create a new file +#define SCM_OTHER_SAVEFILE WM_USER + 0x159 // Save a file +#define SCM_OTHER_CLOSEFILE WM_USER + 0x160 // Close a file +#define SCM_OTHER_ISUNTITLED WM_USER + 0x161 // Returns 1 if untitled, otherwise 0 +#define SCM_OTHER_ACTIVATE WM_USER + 0x162 // Activate a file +#define SCM_OTHER_ACTIVATEDOC WM_USER + 0x163 // Activate a document +#define SCM_OTHER_GETNOTES WM_USER + 0x164 // Gets the notes text (RTF) +#define SCM_OTHER_SETNOTES WM_USER + 0x165 // Set the notes text (RTF) +#define SCM_OTHER_GETFILENAME WM_USER + 0x166 // Gets the filename of a document +#define SCM_OTHER_SETFILENAME WM_USER + 0x167 // Sets the filename +#define SCM_OTHER_FILECOUNT WM_USER + 0x197 // Returns the number of loaded files +#define SCM_OTHER_GETTEXT WM_USER + 0x168 // Gets the text of a document +#define SCM_OTHER_SETTEXT WM_USER + 0x169 // Sets the text of a document + +#define SCM_OUTPUT_SHOW WM_USER + 0x170 // Show the output +#define SCM_OUTPUT_HIDE WM_USER + 0x171 // Hide the output +#define SCM_OUTPUT_ADD WM_USER + 0x172 // Add an item to the output +#define SCM_OUTPUT_CLEAR WM_USER + 0x173 // Clear the output +#define SCM_OUTPUT_DELETE WM_USER + 0x174 // Delete an item in the output +#define SCM_OUTPUT_GETTEXT WM_USER + 0x175 // Get the whole output +#define SCM_OUTPUT_GETITEM WM_USER + 0x176 // Get the text of a specific item +#define SCM_OUTPUT_INDEXOF WM_USER + 0x177 // Gets the item index of an item, returns -1 if not found +#define SCM_ACTIVE_DOCUMENT WM_USER + 0x178 // Returns the index of the active document +#define SCM_ACTIVE_PROJECTS WM_USER + 0x179 // Returns the index of the active projects +#define SCM_EDITOR_SETTEXT WM_USER + 0x180 // Sets the editor's text +#define SCM_EDITOR_GETTEXT WM_USER + 0x181 // Gets the editor's text +#define SCM_EDTIOR_SETCALLTIPS WM_USER + 0x182 // Sets the calltips +#define SCM_EDITOR_SHOWCALLTIP WM_USER + 0x183 // Shows the calltip +#define SCM_EDITOR_SETAUTOCOMPLETE WM_USER + 0x184 // Sets the autocomplete list +#define SCM_EDITOR_SHOWAUTOCOMPLETE WM_USER + 0x185 // Show the autocomplete list +#define SCM_EDITOR_GETSELSTART WM_USER + 0x186 // Gets the sel start +#define SCM_EDITOR_GETSELLENGTH WM_USER + 0x187 // Gets the sel length +#define SCM_EDITOR_SETSELSTART WM_USER + 0x188 // Set sel start +#define SCM_EDITOR_SETSELLENGH WM_USER + 0x189 // Set sel length + +#define SCM_REMOVE_MENUITEM WM_USER + 0x190 // Remove an item from the menu +#define SCM_REMOVE_IMAGE WM_USER + 0x191 // Remove an image from the image list +#define SCM_SETTHEME WM_USER + 0x192 // Set theme +#define SCM_GETTHEME WM_USER + 0x193 // Get theme + + +struct load_info { + /* Plugin Values */ + const CHAR *sPluginName; + const CHAR *sPluginDescription; + /* Form Handles */ + HWND *hModuleHandle; + HWND *hAllFilesForm; + HWND *hAutoIndent; + HWND *hClose; + HWND *hConnGen; + HWND *hGoToLine; + HWND *hHTMLPreview; + HWND *hHudMsgGenerator; + HWND *hInfo; + HWND *hIRCPaster; + HWND *hMainForm; + HWND *hMenuGenerator; + HWND *hMOTDGen; + HWND *hPluginsIniEditor; + HWND *hReplace; + HWND *hSearch; + HWND *hSelectColor; + HWND *hSettings; + HWND *hSocketsTerminal; + HWND *hParamEdit; + /* Important Control Handles */ + HWND *hOutput; + HWND *hCodeExplorer; + HWND *hCodeInspector; + HWND *hNotes; + /* Other */ + void *pApplication; +}; + +int SendStudioMsg(int Message, const CHAR *Data, int IntData) { + HWND StudioHandle; + StudioHandle = FindWindow("TfrmMain", "AMXX-Studio"); + if (StudioHandle != 0) { + COPYDATASTRUCT sMessage; + sMessage.dwData = IntData; + sMessage.cbData = strlen(Data) + 1; + sMessage.lpData = (void *) Data; + return SendMessage(StudioHandle, WM_COPYDATA, (WPARAM)Message, (LPARAM)&sMessage); + } + else + return -1; +} + +// If you receive strings as integer, simply cast them with (CHAR *) SendStudioMsg(...); + +#endif \ No newline at end of file diff --git a/editor/studio/plugins/Hello_World Delphi/HelloWorld.cfg b/editor/studio/plugins/Hello_World Delphi/HelloWorld.cfg new file mode 100644 index 00000000..662b86fe --- /dev/null +++ b/editor/studio/plugins/Hello_World Delphi/HelloWorld.cfg @@ -0,0 +1,38 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-LE"c:\programme\borland\delphi7\Projects\Bpl" +-LN"c:\programme\borland\delphi7\Projects\Bpl" +-w-UNSAFE_TYPE +-w-UNSAFE_CODE +-w-UNSAFE_CAST diff --git a/editor/studio/plugins/Hello_World Delphi/HelloWorld.dpr b/editor/studio/plugins/Hello_World Delphi/HelloWorld.dpr new file mode 100644 index 00000000..2a0b95d8 --- /dev/null +++ b/editor/studio/plugins/Hello_World Delphi/HelloWorld.dpr @@ -0,0 +1,49 @@ +library HelloWorld; + + +uses + SysUtils, + Classes, + Windows, + Messages, + studioapi; + +{$R *.res} + +{ Commands here } + +procedure PluginLoad(LoadInfo: PLoadInfo); cdecl; +begin + // Set Plugin infos after load + LoadInfo.sPluginName := 'Hello World'; + LoadInfo.sPluginDescription := 'Simple Hello World example (Delphi).'; + // Create menu item in Tools with the caption "Hello World! [Delphi]" and with ImageIndex -1 (no image) + SendStudioMsg(SCM_MENU_ADDITEM, 'Tools->Hello World! [Delphi]', -1); +end; + +procedure PluginUnload; cdecl; +begin + // Remove menu stuff etc. + SendStudioMsg(SCM_REMOVE_MENUITEM, 'Hello World! [Delphi]', -1); +end; + +function CustomItemClick(pCaption: PChar): Integer; cdecl; +begin + // Handle custom click + if pCaption = 'Hello World! [Delphi]' then begin + SendStudioMsg(SCM_EDITOR_SETTEXT, 'Hello World!' + #13 + #13 + 'This is a simple example for creating plugins for AMXX-Studio in Delphi.', 0); + Result := PLUGIN_HANDLED; + end + else + Result := PLUGIN_CONTINUE; +end; + +exports // Export all DLL functions + PluginLoad, + PluginUnload, + CustomItemClick; + +begin + +end. + diff --git a/editor/studio/plugins/Hello_World Delphi/HelloWorld.res b/editor/studio/plugins/Hello_World Delphi/HelloWorld.res new file mode 100644 index 00000000..1e4099ba Binary files /dev/null and b/editor/studio/plugins/Hello_World Delphi/HelloWorld.res differ diff --git a/editor/studio/plugins/Hello_World Delphi/studioapi.pas b/editor/studio/plugins/Hello_World Delphi/studioapi.pas new file mode 100644 index 00000000..5508db64 --- /dev/null +++ b/editor/studio/plugins/Hello_World Delphi/studioapi.pas @@ -0,0 +1,194 @@ +unit studioapi; + +interface + +uses SysUtils, Windows, Messages; + +type TLoadInfo = record + { Plugin values } + sPluginName: PChar; + sPluginDescription: PChar; + { Form Handles } + hAllFilesForm: PHandle; + hAutoIndent: PHandle; + hClose: PHandle; + hConnGen: PHandle; + hGoToLine: PHandle; + hHTMLPreview: PHandle; + hHudMsgGenerator: PHandle; + hInfo: PHandle; + hIRCPaster: PHandle; + hMainForm: PHandle; + hMenuGenerator: PHandle; + hMOTDGen: PHandle; + hPluginsIniEditor: PHandle; + hReplace: PHandle; + hSearch: PHandle; + hSelectColor: PHandle; + hSettings: PHandle; + hSocketsTerminal: PHandle; + { Important Control Handles } + hOutput: PHandle; + hCodeExplorer: PHandle; + hCodeInspector: PHandle; // even if it won't be useful + hNotes: PHandle; + { Other } + pApplication: Pointer; // this is only useful for Delphi developers +end; + +type PLoadInfo = ^TLoadInfo; + TLoadPlugin = procedure (LoadInfo: PLoadInfo); cdecl; + TUnloadPlugin = procedure; cdecl; + +const { Return values for dlls } + PLUGIN_CONTINUE = 0; // continue... + PLUGIN_STOP = 1; // stop calling funcs and don't handle the command + PLUGIN_HANDLED = 2; // don't handle the command + { Compile values } + COMP_DEFAULT = 0; + COMP_STARTHL = 1; + COMP_UPLOAD = 2; + { Help values } + HELP_DEFAULT = 0; + HELP_SEARCH = 1; + HELP_FORUMS = 2; + HELP_ABOUT = 3; + { Controls for visible state } + CTRL_OUTPUT = 0; // Output list + CTRL_CODETOOLS_MAIN = 1; // Code-Tools window + CTRL_CODETOOLS_ITEM = 2; // Code-Tools tab + CTRL_NOTES = 3; // Notes tab + { Languages } + NEW_PAWN_PLUGIN = 0; + NEW_PAWN_EMPTYPLUGIN = 1; + NEW_PAWN_HEADER = 2; + NEW_CPP_MODULE = 3; + NEW_CPP_UNIT = 4; + NEW_CPP_HEADER = 5; + NEW_OTHER_TEXTFILE = 6; + NEW_OTHER_HTML = 7; + NEW_OTHER_SQL = 8; + NEW_OTHER_XML = 9; + +const SCM_SHOWPROGRESS = WM_USER + $100; + SCM_HIDEPROGRESS = WM_USER + $101; + SCM_UPDATEPROGRESS = WM_USER + $102; + SCM_LOADCODESNIPPETS = WM_USER + $103; + SCM_CODESNIPPETCLICK = WM_USER + $104; + SCM_MIRC_CMD = WM_USER + $105; + SCM_RELOADINI = WM_USER + $106; + SCM_SELECTLANGUAGE = WM_USER + $107; + SCM_LOADFILE = WM_USER + $108; + SCM_CURRPROJECTS = WM_USER + $109; + SCM_COMPILE = WM_USER + $110; + SCM_COMPILE_UPLOAD = WM_USER + $111; + SCM_COMPILE_STARTHL = WM_USER + $112; + SCM_MENU_LOADIMAGE = WM_USER + $113; + SCM_MENU_ADDITEM = WM_USER + $114; + SCM_MENU_ADDSUBITEM = WM_USER + $115; + SCM_MENU_FAKECLICK = WM_USER + $116; + SCM_MENU_SHOWITEM = WM_USER + $117; + SCM_MENU_HIDEITEM = WM_USER + $118; + SCM_PLUGIN_LOAD = WM_USER + $119; + SCM_PLUGIN_UNLOAD = WM_USER + $120; + SCM_SETTINGS_CREATEPAGE = WM_USER + $121; + SCM_CODEINSPECTOR_CLEAR = WM_USER + $122; + SCM_CODEINSPECTOR_ADD = WM_USER + $123; + SCM_CODEINSPECTOR_ADDCOMBO = WM_USER + $124; + SCM_CODEINSPECTOR_SETVALUE = WM_USER + $125; + SCM_CODEINSPECTOR_SETNAME = WM_USER + $126; + SCM_CODEINSPECTOR_GETVALUE = WM_USER + $127; + SCM_CODEINSPECTOR_GETNAME = WM_USER + $128; + SCM_CODEINSPECTOR_COUNT = WM_USER + $129; + SCM_CODEINSPECTOR_BEGINUPDATE = WM_USER + $130; + SCM_CODEINSPECTOR_ENDUPDATE = WM_USER + $131; + SCM_CODEINSPECTOR_DELETE = WM_USER + $132; + + SCM_PAWN_NEWFILE = WM_USER + $133; + SCM_PAWN_SAVEFILE = WM_USER + $134; + SCM_PAWN_CLOSEFILE = WM_USER + $135; + SCM_PAWN_ISUNTITLED = WM_USER + $136; + SCM_PAWN_ACTIVATE = WM_USER + $137; + SCM_PAWN_ACTIVATEDOC = WM_USER + $138; + SCM_PAWN_GETNOTES = WM_USER + $139; + SCM_PAWN_SETNOTES = WM_USER + $140; + SCM_PAWN_GETFILENAME = WM_USER + $141; + SCM_PAWN_SETFILENAME = WM_USER + $142; + SCM_PAWN_GETTEXT = WM_USER + $143; + SCM_PAWN_SETTEXT = WM_USER + $144; + + SCM_CPP_NEWFILE = WM_USER + $145; + SCM_CPP_SAVEFILE = WM_USER + $146; + SCM_CPP_CLOSEFILE = WM_USER + $147; + SCM_CPP_ISUNTITLED = WM_USER + $148; + SCM_CPP_ACTIVATE = WM_USER + $149; + SCM_CPP_ACTIVATEDOC = WM_USER + $150; + SCM_CPP_ACTIVATEIDE = WM_USER + $151; + SCM_CPP_GETNOTES = WM_USER + $152; + SCM_CPP_SETNOTES = WM_USER + $153; + SCM_CPP_GETFILENAME = WM_USER + $154; + SCM_CPP_SETFILENAME = WM_USER + $155; + SCM_CPP_GETTEXT = WM_USER + $156; + SCM_CPP_SETTEXT = WM_USER + $157; + + SCM_OTHER_NEWFILE = WM_USER + $158; + SCM_OTHER_SAVEFILE = WM_USER + $159; + SCM_OTHER_CLOSEFILE = WM_USER + $160; + SCM_OTHER_ISUNTITLED = WM_USER + $161; + SCM_OTHER_ACTIVATE = WM_USER + $162; + SCM_OTHER_ACTIVATEDOC = WM_USER + $163; + SCM_OTHER_GETNOTES = WM_USER + $164; + SCM_OTHER_SETNOTES = WM_USER + $165; + SCM_OTHER_GETFILENAME = WM_USER + $166; + SCM_OTHER_SETFILENAME = WM_USER + $167; + SCM_OTHER_GETTEXT = WM_USER + $168; + SCM_OTHER_SETTEXT = WM_USER + $169; + + SCM_OUTPUT_SHOW = WM_USER + $170; + SCM_OUTPUT_HIDE = WM_USER + $171; + SCM_OUTPUT_ADD = WM_USER + $172; + SCM_OUTPUT_CLEAR = WM_USER + $173; + SCM_OUTPUT_DELETE = WM_USER + $174; + SCM_OUTPUT_GETTEXT = WM_USER + $175; + SCM_OUTPUT_GETITEM = WM_USER + $176; + SCM_OUTPUT_INDEXOF = WM_USER + $177; + SCM_ACTIVE_DOCUMENT = WM_USER + $178; + SCM_ACTIVE_PROJECTS = WM_USER + $179; + SCM_EDITOR_SETTEXT = WM_USER + $180; + SCM_EDITOR_GETTEXT = WM_USER + $181; + SCM_EDTIOR_SETCALLTIPS = WM_USER + $182; + SCM_EDITOR_SHOWCALLTIP = WM_USER + $183; + SCM_EDITOR_SETAUTOCOMPLETE = WM_USER + $184; + SCM_EDITOR_SHOWAUTOCOMPLETE = WM_USER + $185; + SCM_EDITOR_GETSELSTART = WM_USER + $186; + SCM_EDITOR_GETSELLENGTH = WM_USER + $187; + SCM_EDITOR_SETSELSTART = WM_USER + $188; + SCM_EDITOR_SETSELLENGH = WM_USER + $189; + + SCM_REMOVE_MENUITEM = WM_USER + $190; + SCM_REMOVE_IMAGE = WM_USER + $191; + SCM_SETTHEME = WM_USER + $192; + SCM_GETTHEME = WM_USER + $193; + +function SendStudioMsg(eMessage: Integer; eData: String; eIntData: Integer): Integer; + +implementation + +function SendStudioMsg(eMessage: Integer; eData: String; eIntData: Integer): Integer; +var eStudioHandle: HWND; + eCopyDataStruct: TCopyDataStruct; +begin + with eCopyDataStruct do begin + dwData := eIntData; + cbData := Length(eData) + 1; + lpData := PChar(eData); + end; + + eStudioHandle := FindWindow('TfrmMain', 'AMXX-Studio'); + if eStudioHandle <> 0 then + Result := SendMessage(eStudioHandle, WM_COPYDATA, eMessage, LongInt(@eCopyDataStruct)) + else + Result := 0; +end; + +end.