fb:porticula NoPaste
Versuch für wxFBE-Plugin
Uploader: | nemored |
Datum/Zeit: | 17.07.2013 21:58:26 |
function onLoad alias "onLoad" (byref dyLibID as integer) as integer export
' Use the onLoad function to install our menus
dim as wxMenuBar ptr menuBar = programApi->getEditorMenuBarPtr() ' get pointer to the menubar
dim as wxMenu ptr porticulaMenu, toolsMenu
toolsMenu = wxMenuBar_GetMenu(menuBar, wxMenuBar_FindMenu(menuBar, wxString_ctorUTF8(programApi->getProgramTranslation("menuTools")))) ' find the tools menu - we have to use the language key as the menu is called different in different languages
if toolsMenu <> WX_NULL then
porticulaMenu = wxMenu_ctor(wxString_ctorUTF8("Optionen"), 0)
wxMenuBase_Append(porticulaMenu, dyLibID + codeSave, wxString_ctorUTF8("Code speichern"), wxString_ctorUTF8("speichern"), 0)
wxMenuBase_Append(porticulaMenu, dyLibID + codeLoad, wxString_ctorUTF8("Code laden"), wxString_ctorUTF8("laden"), 0)
wxMenuBase_AppendSubMenu(toolsMenu, 1, wxString_ctorUTF8("Porticula"), porticulaMenu, wxString_ctorUTF8("Porticula-Plugin"))
end if
return 0
end function