Public Member Functions | Static Public Member Functions

ITabDialogManager Class Reference

This reference page is linked to from the following overview topics: Tabbed Dialogs.


Search for all occurrences

Detailed Description

See also:
Class ITabbedDialog, Class ITabPage, Class ITabDialogProc, Class ITabPageProc
Description
This interface is used to create tabbed dialogs and to register tabs with dialogs that are created by the system or other plugins

#include <ITabDialog.h>

Inheritance diagram for ITabDialogManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ITabbedDialog CreateTabbedDialog (HWND parent, HINSTANCE instance, const MCHAR *dlg, ITabDialogProc *mainProc, bool multiline, DWORD helpID=0, int tabID=-1, const Class_ID &dialogID=Class_ID(0, 0))=0
  Create a tabbed dialog.
virtual bool  RegisterTab (const Class_ID &dialogID, ITabDialogPluginTab *tab)=0
  Register a tab for a dialog.
virtual void  UnRegisterTab (const Class_ID &dialogID, ITabDialogPluginTab *tab)=0
  UnRegister a tab for a dialog.
virtual void  SetTabFilter (const Class_ID &dialogID, ITabDialogFilter *filter)=0
  Set the current plugin tab filter for a dialog.
virtual ITabDialogFilter GetTabFilter (const Class_ID &dialogID)=0
  Get the current plugin tab filter for a dialog.
virtual ITabbedDialog GetTabbedDialog (const Class_ID &dialogID)=0
  Get the ITabbedDialog for the dialog id.

Static Public Member Functions

static int  AcceptTab (ITabDialogFilter *filter, ITabDialogPluginTab *tab)
  Test if the filter will accept the passed tab.

Member Function Documentation

virtual ITabbedDialog* CreateTabbedDialog ( HWND  parent,
HINSTANCE  instance,
const MCHAR *  dlg,
ITabDialogProc mainProc,
bool  multiline,
DWORD  helpID = 0,
int  tabID = -1,
const Class_ID dialogID = Class_ID(0, 0) 
) [pure virtual]

Create a tabbed dialog.

Parameters:
parent - the parent window of the dialog
instance - the instance where the dialog template is stored
dlg - the name of the dialog template resource. If instance is NULL, then dlg is a pointer to the dialog template in memory.
mainProc - the object that is used to handle messages for the dialog.
multiline - true if the tab control should be multiline and is only applicable when tabID is -1.
helpID - is used to bring up context sensitive help when the F1 key is pressed.
tabID - the ID of a tab control in the dialog template that is to be used. If tabID is -1, then a tab control is created.
Returns:
The created ITabbedDialog
virtual bool RegisterTab ( const Class_ID dialogID,
ITabDialogPluginTab tab 
) [pure virtual]

Register a tab for a dialog.

Parameters:
dialogID - the id of the dialog this tab is to be used with.
tab - is the address of an object that is used to add the tab when the dialog is created. Tab must remain valid while it is registered.
Returns:
true on success, false otherwise
virtual void UnRegisterTab ( const Class_ID dialogID,
ITabDialogPluginTab tab 
) [pure virtual]

UnRegister a tab for a dialog.

Parameters:
dialogID - the id of the dialog this tab is to be used with.
tab - is the address of an object that is used to add the tab when the dialog is created. Tab must remain valid while it is registered.
Returns:
true on success, false otherwise
virtual void SetTabFilter ( const Class_ID dialogID,
ITabDialogFilter filter 
) [pure virtual]

Set the current plugin tab filter for a dialog.

This filter is used to determine which tabs will be present when the dialog is created.

Parameters:
dialogID - the id of the dialog this filter is to be used with.
filter - The filter to run over the tabs in the dialog
virtual ITabDialogFilter* GetTabFilter ( const Class_ID dialogID ) [pure virtual]

Get the current plugin tab filter for a dialog.

This filter is used to determine which tabs will be present when the dialog is created.

Parameters:
dialogID - the id of the dialog to return the filter off.
Returns:
The current filter on the dialog
virtual ITabbedDialog* GetTabbedDialog ( const Class_ID dialogID ) [pure virtual]

Get the ITabbedDialog for the dialog id.

Returns NULL if dialog not present. Assumes that only one dialog is present for a dialog id at a time. Note: NOTIFY_TABBED_DIALOG_CREATED and NOTIFY_TABBED_DIALOG_DELETED sent when a tabbed dialog is created or deleted.

Parameters:
dialogID - the id of the dialog to return the ITabbedDialog of
Returns:
The ITabbedDialog of the passed dialog if present, else NULL
int AcceptTab ( ITabDialogFilter filter,
ITabDialogPluginTab tab 
) [inline, static]

Test if the filter will accept the passed tab.

Parameters:
filter - The filter to compare tab against
tab - The dialog tab being filtered
Returns:
The value can be a combination of TAB_DIALOG_REMOVE_TAB and TAB_DIALOG_ADD_TAB
{
   int dlgResult = filter == NULL ? TAB_DIALOG_ADD_TAB : filter->AcceptTab(tab);
   if (dlgResult & TAB_DIALOG_ADD_TAB) {
      dlgResult &= ~TAB_DIALOG_ADD_TAB;
      dlgResult |= tab->AcceptDialog(filter);
   }
   return dlgResult;
}

ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager
ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager ITabDialogManager