IDE-Tool: API-gtk-/gdk-command search in DevHelp

Linux specific forum
Oma
Enthusiast
Enthusiast
Posts: 312
Joined: Thu Jun 26, 2014 9:17 am
Location: Germany

IDE-Tool: API-gtk-/gdk-command search in DevHelp

Post by Oma »

Hi all.
You work with PureBasic IDE under Linux and sometimes need help with API gtk-commands?
You got DevHelp installed?
Here's a very simple IDE-Tool to call DevHelp with the API-expression under the cursor or block as search term, from menu or keyboard-shortcut - similar to the PureBasic-Help...

Code: Select all

; Linux-PureBasic-IDE:
; Calls DevHelp with gtk-API-expression under Cursor or selected block ...
;
;   compile this i.e. as 'SearchInDevHelp' in your IDE-tools folder
;   Open in IDE: Tools / Configure Tools... / New
;   Add your exe-name with path in 'Commandline:'
;   Add '%WORD' in 'Arguments:'
;   Add your menu entry in 'Name:', i.e. 'Search in DevHelp'
;   Add your Shortcut (if you like)

Global.i gParameterNum, gRunOkay, gI
Global.s gParameter

gParameterNum= CountProgramParameters()
For gI= 0 To gParameterNum- 1
	gParameter= ProgramParameter(I)
	If gI = 0 : Break : EndIf
Next gI

If gParameter <> ""
	gParameter= RTrim(gParameter)
	gParameter= RTrim(gParameter, "_")
	gRunOkay= RunProgram("devhelp", "-s "+ gParameter, "")
	If Not gRunOkay
		MessageRequester("SearchInDevHelp", "DevHelp couldn't be startet!")
	EndIf
Else
	MessageRequester("SearchInDevHelp", "No search expression in parameters!" + #LF$ + "DevHelp won't be started.")
EndIf
Best Regards, Charly
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de