ReactOS 0.4.15-dev-7906-g1b85a5f
CTipbarAccessible Class Reference
Inheritance diagram for CTipbarAccessible:
Collaboration diagram for CTipbarAccessible:

Public Member Functions

 CTipbarAccessible (CTipbarAccItem *pItem)
 
virtual ~CTipbarAccessible ()
 
HRESULT Initialize ()
 
BOOL AddAccItem (CTipbarAccItem *pItem)
 
HRESULT RemoveAccItem (CTipbarAccItem *pItem)
 
void ClearAccItems ()
 
CTipbarAccItemAccItemFromID (INT iItem)
 
INT GetIDOfItem (CTipbarAccItem *pTarget)
 
LONG_PTR CreateRefToAccObj (WPARAM wParam)
 
BOOL DoDefaultActionReal (INT nID)
 
void NotifyWinEvent (DWORD event, CTipbarAccItem *pItem)
 
void SetWindow (HWND hWnd)
 
STDMETHOD() QueryInterface (REFIID riid, void **ppvObject)
 
 STDMETHOD_ (ULONG, AddRef)()
 
 STDMETHOD_ (ULONG, Release)()
 
STDMETHOD() GetTypeInfoCount (UINT *pctinfo)
 
STDMETHOD() GetTypeInfo (UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
STDMETHOD() GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
STDMETHOD() Invoke (DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
STDMETHOD() get_accParent (IDispatch **ppdispParent)
 
STDMETHOD() get_accChildCount (LONG *pcountChildren)
 
STDMETHOD() get_accChild (VARIANT varChildID, IDispatch **ppdispChild)
 
STDMETHOD() get_accName (VARIANT varID, BSTR *pszName)
 
STDMETHOD() get_accValue (VARIANT varID, BSTR *pszValue)
 
STDMETHOD() get_accDescription (VARIANT varID, BSTR *description)
 
STDMETHOD() get_accRole (VARIANT varID, VARIANT *role)
 
STDMETHOD() get_accState (VARIANT varID, VARIANT *state)
 
STDMETHOD() get_accHelp (VARIANT varID, BSTR *help)
 
STDMETHOD() get_accHelpTopic (BSTR *helpfile, VARIANT varID, LONG *pidTopic)
 
STDMETHOD() get_accKeyboardShortcut (VARIANT varID, BSTR *shortcut)
 
STDMETHOD() get_accFocus (VARIANT *pvarID)
 
STDMETHOD() get_accSelection (VARIANT *pvarID)
 
STDMETHOD() get_accDefaultAction (VARIANT varID, BSTR *action)
 
STDMETHOD() accSelect (LONG flagsSelect, VARIANT varID)
 
STDMETHOD() accLocation (LONG *left, LONG *top, LONG *width, LONG *height, VARIANT varID)
 
STDMETHOD() accNavigate (LONG dir, VARIANT varStart, VARIANT *pvarEnd)
 
STDMETHOD() accHitTest (LONG left, LONG top, VARIANT *pvarID)
 
STDMETHOD() accDoDefaultAction (VARIANT varID)
 
STDMETHOD() put_accName (VARIANT varID, BSTR name)
 
STDMETHOD() put_accValue (VARIANT varID, BSTR value)
 
HRESULT accSelect ([in] long flagsSelect, [in, optional] VARIANT varID)
 
HRESULT accLocation ([out] long *left, [out] long *top, [out] long *width, [out] long *height, [in, optional] VARIANT varID)
 
HRESULT accNavigate ([in] long dir, [in, optional] VARIANT varStart, [out, retval] VARIANT *pvarEnd)
 
HRESULT accHitTest ([in] long left, [in] long top, [out, retval] VARIANT *pvarID)
 
HRESULT accDoDefaultAction ([in, optional] VARIANT varID)
 
- Public Member Functions inherited from IDispatch
HRESULT GetTypeInfoCount ([out] UINT *pctinfo)
 
HRESULT GetTypeInfo ([in] UINT iTInfo, [in] LCID lcid, [out] ITypeInfo **ppTInfo)
 
HRESULT GetIDsOfNames ([in] REFIID riid, [in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [in] LCID lcid, [out, size_is(cNames)] DISPID *rgDispId)
 
HRESULT Invoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
 
HRESULT RemoteInvoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] DWORD dwFlags, [in] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *pArgErr, [in] UINT cVarRef, [in, size_is(cVarRef)] UINT *rgVarRefIdx, [in, out, size_is(cVarRef)] VARIANTARG *rgVarRef)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

LONG m_cRefs
 
HWND m_hWnd
 
IAccessiblem_pStdAccessible
 
ITypeInfom_pTypeInfo
 
BOOL m_bInitialized
 
CicArray< CTipbarAccItem * > m_AccItems
 
LONG m_cSelection
 

Friends

class CUTBMenuWnd
 
class CTipbarWnd
 

Additional Inherited Members

- Public Types inherited from IAccessible
typedef IAccessibleLPACCESSIBLE
 
- Public Types inherited from IDispatch
typedef IDispatchLPDISPATCH
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Attributes inherited from IAccessible
const long DISPID_ACC_PARENT = -5000
 
const long DISPID_ACC_CHILDCOUNT = -5001
 
const long DISPID_ACC_CHILD = -5002
 
const long DISPID_ACC_NAME = -5003
 
const long DISPID_ACC_VALUE = -5004
 
const long DISPID_ACC_DESCRIPTION = -5005
 
const long DISPID_ACC_ROLE = -5006
 
const long DISPID_ACC_STATE = -5007
 
const long DISPID_ACC_HELP = -5008
 
const long DISPID_ACC_HELPTOPIC = -5009
 
const long DISPID_ACC_KEYBOARDSHORTCUT = -5010
 
const long DISPID_ACC_FOCUS = -5011
 
const long DISPID_ACC_SELECTION = -5012
 
const long DISPID_ACC_DEFAULTACTION = -5013
 
const long DISPID_ACC_SELECT = -5014
 
const long DISPID_ACC_LOCATION = -5015
 
const long DISPID_ACC_NAVIGATE = -5016
 
const long DISPID_ACC_HITTEST = -5017
 
const long DISPID_ACC_DODEFAULTACTION = -5018
 
- Public Attributes inherited from IDispatch
const DISPID DISPID_UNKNOWN = -1
 
const DISPID DISPID_VALUE = 0
 
const DISPID DISPID_PROPERTYPUT = -3
 
const DISPID DISPID_NEWENUM = -4
 
const DISPID DISPID_EVALUATE = -5
 
const DISPID DISPID_CONSTRUCTOR = -6
 
const DISPID DISPID_DESTRUCTOR = -7
 
const DISPID DISPID_COLLECT = -8
 
- Properties inherited from IAccessible
IDispatch accParent [get]
 
long accChildCount [get]
 
IDispatch accChild ([in] VARIANT varChildID) [get]
 
BSTR accName ([in, optional] VARIANT varID) [get, set]
 
BSTR accValue ([in, optional] VARIANT varID) [get, set]
 
BSTR accDescription ([in, optional] VARIANT varID) [get]
 
VARIANT accRole ([in, optional] VARIANT varID) [get]
 
VARIANT accState ([in, optional] VARIANT varID) [get]
 
BSTR accHelp ([in, optional] VARIANT varID) [get]
 
long accHelpTopic ([out] BSTR helpfile,[in, optional] VARIANT varID) [get]
 
BSTR accKeyboardShortcut ([in, optional] VARIANT varID) [get]
 
VARIANT accFocus [get]
 
VARIANT accSelection [get]
 
BSTR accDefaultAction ([in, optional] VARIANT varID) [get]
 

Detailed Description

Definition at line 768 of file msutb.cpp.

Constructor & Destructor Documentation

◆ CTipbarAccessible()

CTipbarAccessible::CTipbarAccessible ( CTipbarAccItem pItem)

Definition at line 2071 of file msutb.cpp.

2072{
2073 m_cRefs = 1;
2074 m_hWnd = NULL;
2075 m_pTypeInfo = NULL;
2078 m_cSelection = 1;
2079 m_AccItems.Add(pItem);
2080 ++g_DllRefCount;
2081}
BOOL m_bInitialized
Definition: msutb.cpp:775
IAccessible * m_pStdAccessible
Definition: msutb.cpp:773
ITypeInfo * m_pTypeInfo
Definition: msutb.cpp:774
CicArray< CTipbarAccItem * > m_AccItems
Definition: msutb.cpp:776
BOOL Add(const T_ITEM &item)
Definition: cicarray.h:60
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
LONG g_DllRefCount
Definition: msutb.cpp:34

◆ ~CTipbarAccessible()

CTipbarAccessible::~CTipbarAccessible ( )
virtual

Definition at line 2083 of file msutb.cpp.

2084{
2086 if (m_pTypeInfo)
2087 {
2089 m_pTypeInfo = NULL;
2090 }
2091 if (m_pStdAccessible)
2092 {
2095 }
2096 --g_DllRefCount;
2097}
ULONG Release()

Member Function Documentation

◆ accDoDefaultAction()

STDMETHODIMP CTipbarAccessible::accDoDefaultAction ( VARIANT  varID)

Implements IAccessible.

Definition at line 2563 of file msutb.cpp.

2564{
2565 if (V_VT(&varID) != VT_I4)
2566 return E_INVALIDARG;
2567 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2568 if (!pItem)
2569 return DISP_E_MEMBERNOTFOUND;
2570 return (pItem->DoAccDefaultAction() ? S_OK : S_FALSE);
2571}
CTipbarAccItem * AccItemFromID(INT iItem)
Definition: msutb.cpp:2145
#define E_INVALIDARG
Definition: ddrawi.h:101
@ VT_I4
Definition: compat.h:2298
#define S_OK
Definition: intsafe.h:52
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define S_FALSE
Definition: winerror.h:2357
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512

◆ accHitTest()

STDMETHODIMP CTipbarAccessible::accHitTest ( LONG  left,
LONG  top,
VARIANT pvarID 
)

Implements IAccessible.

Definition at line 2528 of file msutb.cpp.

2529{
2530 if (!pvarID)
2531 return E_INVALIDARG;
2532 POINT Point = { left, top };
2533 RECT Rect;
2536
2537 if (!::PtInRect(&Rect, Point))
2538 {
2539 V_VT(pvarID) = VT_EMPTY;
2540 return S_OK;
2541 }
2542
2543 V_VT(pvarID) = VT_I4;
2544 V_I4(pvarID) = 0;
2545
2546 for (size_t iItem = 1; iItem < m_AccItems.size(); ++iItem)
2547 {
2548 CTipbarAccItem *pItem = m_AccItems[iItem];
2549 if (pItem)
2550 {
2551 pItem->GetAccLocation(&Rect);
2552 if (::PtInRect(&Rect, Point))
2553 {
2554 V_I4(pvarID) = iItem;
2555 break;
2556 }
2557 }
2558 }
2559
2560 return S_OK;
2561}
size_t size() const
Definition: cicarray.h:34
@ VT_EMPTY
Definition: compat.h:2295
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

◆ AccItemFromID()

CTipbarAccItem * CTipbarAccessible::AccItemFromID ( INT  iItem)

Definition at line 2145 of file msutb.cpp.

2146{
2147 if (iItem < 0 || (INT)m_AccItems.size() <= iItem)
2148 return NULL;
2149 return m_AccItems[iItem];
2150}
int32_t INT
Definition: typedefs.h:58

Referenced by accDoDefaultAction(), accLocation(), DoDefaultActionReal(), get_accDefaultAction(), get_accName(), get_accRole(), get_accState(), and get_accValue().

◆ accLocation()

STDMETHODIMP CTipbarAccessible::accLocation ( LONG left,
LONG top,
LONG width,
LONG height,
VARIANT  varID 
)

Implements IAccessible.

Definition at line 2455 of file msutb.cpp.

2461{
2462 if (!left || !top || !width || !height)
2463 return E_INVALIDARG;
2464
2465 if (!V_I4(&varID))
2466 return m_pStdAccessible->accLocation(left, top, width, height, varID);
2467
2468 RECT rc;
2469 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2470 pItem->GetAccLocation(&rc);
2471
2472 *left = rc.left;
2473 *top = rc.top;
2474 *width = rc.right - rc.left;
2475 *height = rc.bottom - rc.top;
2476 return S_OK;
2477}
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
HRESULT accLocation([out] long *left, [out] long *top, [out] long *width, [out] long *height, [in, optional] VARIANT varID)
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

◆ accNavigate()

STDMETHODIMP CTipbarAccessible::accNavigate ( LONG  dir,
VARIANT  varStart,
VARIANT pvarEnd 
)

Implements IAccessible.

Definition at line 2479 of file msutb.cpp.

2483{
2484 if (m_AccItems.size() <= 1)
2485 {
2486 V_VT(pvarEnd) = VT_EMPTY;
2487 return S_OK;
2488 }
2489
2490 switch (dir)
2491 {
2492 case NAVDIR_UP:
2493 case NAVDIR_LEFT:
2494 case NAVDIR_PREVIOUS:
2495 V_VT(pvarEnd) = VT_I4;
2496 V_I4(pvarEnd) = V_I4(&varStart) - 1;
2497 if (V_I4(&varStart) - 1 <= 0)
2498 V_I4(pvarEnd) = (INT)(m_AccItems.size() - 1);
2499 return S_OK;
2500
2501 case NAVDIR_DOWN:
2502 case NAVDIR_RIGHT:
2503 case NAVDIR_NEXT:
2504 V_VT(pvarEnd) = VT_I4;
2505 V_I4(pvarEnd) = V_I4(&varStart) + 1;
2506 if ((INT)m_AccItems.size() <= V_I4(&varStart) + 1)
2507 V_I4(pvarEnd) = 1;
2508 return S_OK;
2509
2510 case NAVDIR_FIRSTCHILD:
2511 V_VT(pvarEnd) = VT_I4;
2512 V_I4(pvarEnd) = 1;
2513 return S_OK;
2514
2515 case NAVDIR_LASTCHILD:
2516 V_VT(pvarEnd) = VT_I4;
2517 V_I4(pvarEnd) = (INT)(m_AccItems.size() - 1);
2518 return S_OK;
2519
2520 default:
2521 break;
2522 }
2523
2524 V_VT(pvarEnd) = VT_EMPTY;
2525 return S_OK;
2526}
unsigned int dir
Definition: maze.c:112
#define INT
Definition: polytest.cpp:20

◆ accSelect()

STDMETHODIMP CTipbarAccessible::accSelect ( LONG  flagsSelect,
VARIANT  varID 
)

Implements IAccessible.

Definition at line 2435 of file msutb.cpp.

2438{
2439 if ((flagsSelect & SELFLAG_ADDSELECTION) && (flagsSelect & SELFLAG_REMOVESELECTION))
2440 return E_INVALIDARG;
2441 if (flagsSelect & (SELFLAG_TAKEFOCUS | SELFLAG_ADDSELECTION | SELFLAG_EXTENDSELECTION))
2442 return S_FALSE;
2443 if (flagsSelect & SELFLAG_REMOVESELECTION)
2444 return S_OK;
2445 if (V_VT(&varID) != VT_I4)
2446 return E_INVALIDARG;
2447 if (flagsSelect & SELFLAG_TAKESELECTION)
2448 {
2449 m_cSelection = V_I4(&varID);
2450 return S_OK;
2451 }
2452 return S_FALSE;
2453}

◆ AddAccItem()

BOOL CTipbarAccessible::AddAccItem ( CTipbarAccItem pItem)

Definition at line 2122 of file msutb.cpp.

2123{
2124 return m_AccItems.Add(pItem);
2125}

Referenced by CTipbarItem::_AddedToUI().

◆ ClearAccItems()

void CTipbarAccessible::ClearAccItems ( )

Definition at line 2140 of file msutb.cpp.

2141{
2142 m_AccItems.clear();
2143}
void clear()
Definition: cicarray.h:36

◆ CreateRefToAccObj()

LONG_PTR CTipbarAccessible::CreateRefToAccObj ( WPARAM  wParam)

Definition at line 2162 of file msutb.cpp.

2163{
2164 return ::LresultFromObject(IID_IAccessible, wParam, this);
2165}
WPARAM wParam
Definition: combotst.c:138

◆ DoDefaultActionReal()

BOOL CTipbarAccessible::DoDefaultActionReal ( INT  nID)

Definition at line 2167 of file msutb.cpp.

2168{
2169 CTipbarAccItem *pItem = AccItemFromID(nID);
2170 if (!pItem)
2171 return FALSE;
2172 return pItem->DoAccDefaultActionReal();
2173}

◆ get_accChild()

STDMETHODIMP CTipbarAccessible::get_accChild ( VARIANT  varChildID,
IDispatch **  ppdispChild 
)

Definition at line 2292 of file msutb.cpp.

2295{
2296 if (!ppdispChild)
2297 return E_INVALIDARG;
2298 *ppdispChild = NULL;
2299 return S_FALSE;
2300}

◆ get_accChildCount()

STDMETHODIMP CTipbarAccessible::get_accChildCount ( LONG pcountChildren)

Definition at line 2281 of file msutb.cpp.

2282{
2283 if (!pcountChildren)
2284 return E_INVALIDARG;
2285 INT cItems = (INT)m_AccItems.size();
2286 if (!cItems)
2287 return E_FAIL;
2288 *pcountChildren = cItems - 1;
2289 return S_OK;
2290}
#define E_FAIL
Definition: ddrawi.h:102

◆ get_accDefaultAction()

STDMETHODIMP CTipbarAccessible::get_accDefaultAction ( VARIANT  varID,
BSTR action 
)

Definition at line 2415 of file msutb.cpp.

2418{
2419 if (!action)
2420 return E_INVALIDARG;
2421 *action = NULL;
2422
2423 if (V_VT(&varID) != VT_I4)
2424 return E_INVALIDARG;
2425
2426 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2427 if (!pItem)
2428 return DISP_E_MEMBERNOTFOUND;
2429 *action = pItem->GetAccDefaultAction();
2430 if (!*action)
2431 return S_FALSE;
2432 return S_OK;
2433}
const WCHAR * action
Definition: action.c:7479

◆ get_accDescription()

STDMETHODIMP CTipbarAccessible::get_accDescription ( VARIANT  varID,
BSTR description 
)

Definition at line 2332 of file msutb.cpp.

2335{
2336 if (!description)
2337 return E_INVALIDARG;
2338 return m_pStdAccessible->get_accDescription(varID, description);
2339}
const char * description
Definition: directx.c:2497

◆ get_accFocus()

STDMETHODIMP CTipbarAccessible::get_accFocus ( VARIANT pvarID)

Definition at line 2387 of file msutb.cpp.

2388{
2389 if (!pvarID)
2390 return E_INVALIDARG;
2391 V_VT(pvarID) = VT_EMPTY;
2392 return S_FALSE;
2393}

◆ get_accHelp()

STDMETHODIMP CTipbarAccessible::get_accHelp ( VARIANT  varID,
BSTR help 
)

Definition at line 2369 of file msutb.cpp.

2370{
2371 return DISP_E_MEMBERNOTFOUND;
2372}

◆ get_accHelpTopic()

STDMETHODIMP CTipbarAccessible::get_accHelpTopic ( BSTR helpfile,
VARIANT  varID,
LONG pidTopic 
)

Definition at line 2374 of file msutb.cpp.

2378{
2379 return DISP_E_MEMBERNOTFOUND;
2380}

◆ get_accKeyboardShortcut()

STDMETHODIMP CTipbarAccessible::get_accKeyboardShortcut ( VARIANT  varID,
BSTR shortcut 
)

Definition at line 2382 of file msutb.cpp.

2383{
2384 return DISP_E_MEMBERNOTFOUND;
2385}

◆ get_accName()

STDMETHODIMP CTipbarAccessible::get_accName ( VARIANT  varID,
BSTR pszName 
)

Definition at line 2302 of file msutb.cpp.

2305{
2306 if (!pszName)
2307 return E_INVALIDARG;
2308 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2309 if (!pItem)
2310 return E_INVALIDARG;
2311 *pszName = pItem->GetAccName();
2312 if (!*pszName)
2313 return DISP_E_MEMBERNOTFOUND;
2314 return S_OK;
2315}

◆ get_accParent()

STDMETHODIMP CTipbarAccessible::get_accParent ( IDispatch **  ppdispParent)

Definition at line 2276 of file msutb.cpp.

2277{
2278 return m_pStdAccessible->get_accParent(ppdispParent);
2279}

◆ get_accRole()

STDMETHODIMP CTipbarAccessible::get_accRole ( VARIANT  varID,
VARIANT role 
)

Definition at line 2341 of file msutb.cpp.

2344{
2345 if (!role)
2346 return E_INVALIDARG;
2347 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2348 if (!pItem)
2349 return E_INVALIDARG;
2350 V_VT(role) = VT_I4;
2351 V_I4(role) = pItem->GetAccRole();
2352 return S_OK;
2353}

◆ get_accSelection()

STDMETHODIMP CTipbarAccessible::get_accSelection ( VARIANT pvarID)

Definition at line 2395 of file msutb.cpp.

2396{
2397 if (!pvarID)
2398 return E_INVALIDARG;
2399
2400 V_VT(pvarID) = VT_EMPTY;
2401
2402 INT cItems = (INT)m_AccItems.size();
2403 if (cItems < m_cSelection)
2404 return S_FALSE;
2405
2406 if (cItems > m_cSelection)
2407 {
2408 V_VT(pvarID) = VT_I4;
2409 V_I4(pvarID) = m_cSelection;
2410 }
2411
2412 return S_OK;
2413}

◆ get_accState()

STDMETHODIMP CTipbarAccessible::get_accState ( VARIANT  varID,
VARIANT state 
)

Definition at line 2355 of file msutb.cpp.

2358{
2359 if (!state)
2360 return E_INVALIDARG;
2361 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2362 if (!pItem)
2363 return E_INVALIDARG;
2364 V_VT(state) = VT_I4;
2365 V_I4(state) = pItem->GetAccState();
2366 return S_OK;
2367}
static int state
Definition: maze.c:121

◆ get_accValue()

STDMETHODIMP CTipbarAccessible::get_accValue ( VARIANT  varID,
BSTR pszValue 
)

Definition at line 2317 of file msutb.cpp.

2320{
2321 if (!pszValue)
2322 return E_INVALIDARG;
2323 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2324 if (!pItem)
2325 return E_INVALIDARG;
2326 *pszValue = pItem->GetAccValue();
2327 if (!*pszValue)
2328 return DISP_E_MEMBERNOTFOUND;
2329 return S_OK;
2330}

◆ GetIDOfItem()

INT CTipbarAccessible::GetIDOfItem ( CTipbarAccItem pTarget)

Definition at line 2152 of file msutb.cpp.

2153{
2154 for (size_t iItem = 0; iItem < m_AccItems.size(); ++iItem)
2155 {
2156 if (pTarget == m_AccItems[iItem])
2157 return (INT)iItem;
2158 }
2159 return -1;
2160}
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97

Referenced by NotifyWinEvent(), CTipbarWnd::StartDoAccDefaultActionTimer(), and CUTBMenuWnd::StartDoAccDefaultActionTimer().

◆ GetIDsOfNames()

STDMETHODIMP CTipbarAccessible::GetIDsOfNames ( REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)

Implements IDispatch.

Definition at line 2243 of file msutb.cpp.

2249{
2250 if (!m_pTypeInfo)
2251 return E_NOTIMPL;
2252 return m_pTypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
2253}
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT GetIDsOfNames([in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [out, size_is(cNames)] MEMBERID *pMemId)

◆ GetTypeInfo()

STDMETHODIMP CTipbarAccessible::GetTypeInfo ( UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)

Implements IDispatch.

Definition at line 2226 of file msutb.cpp.

2230{
2231 if (!ppTInfo)
2232 return E_INVALIDARG;
2233 *ppTInfo = NULL;
2234 if (iTInfo != 0)
2236 if (!m_pTypeInfo)
2237 return E_NOTIMPL;
2238 *ppTInfo = m_pTypeInfo;
2240 return S_OK;
2241}
ULONG AddRef()
#define TYPE_E_ELEMENTNOTFOUND
Definition: winerror.h:2539

◆ GetTypeInfoCount()

STDMETHODIMP CTipbarAccessible::GetTypeInfoCount ( UINT pctinfo)

Implements IDispatch.

Definition at line 2218 of file msutb.cpp.

2219{
2220 if (!pctinfo)
2221 return E_INVALIDARG;
2222 *pctinfo = (m_pTypeInfo == NULL);
2223 return S_OK;
2224}

◆ Initialize()

HRESULT CTipbarAccessible::Initialize ( )

Definition at line 2099 of file msutb.cpp.

2100{
2102
2104 (void **)&m_pStdAccessible);
2105 if (FAILED(hr))
2106 return hr;
2107
2108 ITypeLib *pTypeLib;
2109 hr = ::LoadRegTypeLib(LIBID_Accessibility, 1, 0, 0, &pTypeLib);
2110 if (FAILED(hr))
2111 hr = ::LoadTypeLib(L"OLEACC.DLL", &pTypeLib);
2112
2113 if (SUCCEEDED(hr))
2114 {
2115 hr = pTypeLib->GetTypeInfoOfGuid(IID_IAccessible, &m_pTypeInfo);
2116 pTypeLib->Release();
2117 }
2118
2119 return hr;
2120}
#define TRUE
Definition: types.h:120
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:154
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
HRESULT GetTypeInfoOfGuid([in] REFGUID guid, [out] ITypeInfo **ppTinfo)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define L(x)
Definition: ntvdm.h:50
HRESULT hr
Definition: shlfolder.c:183
#define OBJID_CLIENT
Definition: winable.h:19

◆ Invoke()

STDMETHODIMP CTipbarAccessible::Invoke ( DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)

Implements IDispatch.

Definition at line 2255 of file msutb.cpp.

2264{
2265 if (!m_pTypeInfo)
2266 return E_NOTIMPL;
2267 return m_pTypeInfo->Invoke(this,
2268 dispIdMember,
2269 wFlags,
2270 pDispParams,
2271 pVarResult,
2272 pExcepInfo,
2273 puArgErr);
2274}
HRESULT Invoke([in] PVOID pvInstance, [in] MEMBERID memid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ NotifyWinEvent()

void CTipbarAccessible::NotifyWinEvent ( DWORD  event,
CTipbarAccItem pItem 
)

Definition at line 2175 of file msutb.cpp.

2176{
2177 INT nID = GetIDOfItem(pItem);
2178 if (nID < 0)
2179 return;
2180
2181 ::NotifyWinEvent(event, m_hWnd, -4, nID);
2182}
INT GetIDOfItem(CTipbarAccItem *pTarget)
Definition: msutb.cpp:2152
void NotifyWinEvent(DWORD event, CTipbarAccItem *pItem)
Definition: msutb.cpp:2175
struct _cl_event * event
Definition: glext.h:7739

Referenced by NotifyWinEvent().

◆ put_accName()

STDMETHODIMP CTipbarAccessible::put_accName ( VARIANT  varID,
BSTR  name 
)

Definition at line 2573 of file msutb.cpp.

2574{
2575 return S_FALSE;
2576}

◆ put_accValue()

STDMETHODIMP CTipbarAccessible::put_accValue ( VARIANT  varID,
BSTR  value 
)

Definition at line 2578 of file msutb.cpp.

2579{
2580 return S_FALSE;
2581}

◆ QueryInterface()

STDMETHODIMP CTipbarAccessible::QueryInterface ( REFIID  riid,
void **  ppvObject 
)

Implements IUnknown.

Definition at line 2189 of file msutb.cpp.

2192{
2193 static const QITAB c_tab[] =
2194 {
2197 { NULL }
2198 };
2199 return ::QISearch(this, c_tab, riid, ppvObject);
2200}
REFIID riid
Definition: atlbase.h:39
#define QITABENT(Cthis, Ifoo)
Definition: shlwapi.h:2094
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

◆ RemoveAccItem()

HRESULT CTipbarAccessible::RemoveAccItem ( CTipbarAccItem pItem)

Definition at line 2127 of file msutb.cpp.

2128{
2129 for (size_t iItem = 0; iItem < m_AccItems.size(); ++iItem)
2130 {
2131 if (m_AccItems[iItem] == pItem)
2132 {
2133 m_AccItems.Remove(iItem, 1);
2134 break;
2135 }
2136 }
2137 return S_OK;
2138}
void Remove(size_t iItem, size_t cRemove=1)
Definition: cicarray.cpp:57

Referenced by CTipbarItem::_RemovedToUI(), and CTipbarItem::~CTipbarItem().

◆ SetWindow()

void CTipbarAccessible::SetWindow ( HWND  hWnd)

Definition at line 2184 of file msutb.cpp.

2185{
2186 m_hWnd = hWnd;
2187}
HWND hWnd
Definition: settings.c:17

◆ STDMETHOD_() [1/2]

CTipbarAccessible::STDMETHOD_ ( ULONG  ,
AddRef   
)

◆ STDMETHOD_() [2/2]

CTipbarAccessible::STDMETHOD_ ( ULONG  ,
Release   
)

Friends And Related Function Documentation

◆ CTipbarWnd

friend class CTipbarWnd
friend

Definition at line 779 of file msutb.cpp.

◆ CUTBMenuWnd

friend class CUTBMenuWnd
friend

Definition at line 778 of file msutb.cpp.

Member Data Documentation

◆ m_AccItems

◆ m_bInitialized

BOOL CTipbarAccessible::m_bInitialized
protected

Definition at line 775 of file msutb.cpp.

Referenced by CTipbarAccessible(), and Initialize().

◆ m_cRefs

LONG CTipbarAccessible::m_cRefs
protected

Definition at line 771 of file msutb.cpp.

Referenced by CTipbarAccessible().

◆ m_cSelection

LONG CTipbarAccessible::m_cSelection
protected

Definition at line 777 of file msutb.cpp.

Referenced by accSelect(), CTipbarAccessible(), and get_accSelection().

◆ m_hWnd

HWND CTipbarAccessible::m_hWnd
protected

Definition at line 772 of file msutb.cpp.

Referenced by accHitTest(), CTipbarAccessible(), Initialize(), NotifyWinEvent(), and SetWindow().

◆ m_pStdAccessible

IAccessible* CTipbarAccessible::m_pStdAccessible
protected

◆ m_pTypeInfo

ITypeInfo* CTipbarAccessible::m_pTypeInfo
protected

The documentation for this class was generated from the following file: