Plugin Development - Questions about the plugin API.
Started by antidigerati


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


5 posts in this topic
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
03-10-2004, 04:04 PM -
#3
Quote:2) Some plugins, like Network Monitor, display an icon within their description popup. Where is that icon set? How can I do something similar?
Here you can download the sources of Net Monitor, Command Line and the last version of TLB PDK.

To add icon see the CNetMonBtn::Invoke with id == TBTN_INVOKE_GETTIPSICON

Quote:3) Where can I find a detailed description of what all of the BTNINFO_MASK_* mask values are for?
BTNINFO_MASK_MODEFLAG: You must fill the BUTTONINFO.dwMask field with combination of flags:
BTN_FLAG_PLANE - the button is always flat like Net Monitor. You will never get Run for this button.
BTN_FLAG_STOPDRAG - Disable Drag&Drop for button. Set when you drag sliders or others controls inside plugin.
BTN_FLAG_COLAPCEONRUN - Not used
BTN_FLAG_NOTIPS - Disable tips for plugin
BTN_FLAG_SUPPORTSAVEDICON - in design right now
BTN_FLAG_SUPPORTPNGICONS - in design right now
BTN_FLAG_INPLACERENAME - in design right now

BTNINFO_MASK_ACTIONS: BUTTONINFO.dwActions
TLB asks for supported actions. If some of action must be performed then TLB calls DoAction method with one of flags. Can be combinations of flags:
CTMS_PROPERTIES - Plugin supports Properties
CTMS_RENAME - Plugin supports renaming
CTMS_CHANGEICON - Plugin supports "Change Icon" feature
CTMS_HOVERRUN - Plugin supports hover run feature (if enabled in TLB)
CTMS_FINDTARGET - Plugin supports "Find Target" feature
CTMS_OPENFOLDER - Plugin supports "Open Folder" feature
CTMS_NODELETE - not used
CTMS_RESETICON - Plugin supports "Reset Icon" feature
CTMS_SETIMAGE - Plugin supports "Set Image" feature
CTMS_ABOUT - Plugin supports "About" feature (will be released in the next version of TLB)
CTMS_DELETE - Plugin supports "Delete" feature.

BTNINFO_MASK_SIZE: The size of plugin. The size can be different if plugin insize toolbar and when on menu.

BTNINFO_MASK_ACTUALSIZE: The size of plugin when it is placed on toolbar. You must ignore the real location of plugin.

BTNINFO_MASK_ICON, BTNINFO_MASK_SELECTEDICON: not used.
BTNINFO_MASK_DESCRIPTION: The tip text. But in the last versions is not used. (btninfo->strData)
BTNINFO_MASK_TEXT: If you implement this TLB draw text with all current styles and when needed. (btninfo->strData)

Quote:4) What is InvokeCommand() used for? What are potential IDs that can occur?
Invoke command from context menu. First you must implement QueryContextMenu:
Code:
STDMETHODIMP_(int) ITlbButton::QueryContextMenu(HMENU hMenu, int index, int cmdFirst, int cmdLast)
hMenu - Insert your menu items here
index - Insert you items from this index
cmdFirst - Beginning of commands ID
cmdLast - End of commands ID (actually can be ignored).
Return value Number of items you have inserted into menu.

When user click one of menu item you've inserted then TLB call InvokeCommand with ID == menuItemID - cmdFirst.

Quote:What is Invoke() used for? I found the following comments in a .h file
This method used for extending TLB. Most of new features are released using this method. You must switch by ID, see sources.

Quote:6) What is SetLCID() ?
This function used for localization of plugins. TLB call this function with laguage ID and resource module if exists.

Quote:7) In StateChanged(), what are the possible values of 'state' ?
TS_STATE_NORMAL
TS_STATE_OVER
TS_STATE_DOWN
TS_STATE_OPENACTIVE (menu is opened and active)
TS_STATE_OPENINACTIVE (menu is opened and not active)

Quote:The examples provided did show some usage, but again without comments, so I could see it being used but didn't really understand what was happening.
I'm working on documentation for PDK and the classes that can simplify developing. When I'm finish this work I'll open special section for developers on wesite. Right now you can ask any question here.
The TORDEX Team
http://www.tordex.com


Messages In This Thread
[No subject] - by antidigerati - 03-09-2004, 10:47 PM
[No subject] - by HorusUK - 03-10-2004, 02:46 AM
[No subject] - by Yuri Kobets - 03-10-2004, 04:04 PM
[No subject] - by Yuri Kobets - 03-10-2004, 04:06 PM
[No subject] - by antidigerati - 03-10-2004, 04:35 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)