ReactOS 0.4.16-dev-226-g79f2289
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 763 of file msutb.cpp.

Constructor & Destructor Documentation

◆ CTipbarAccessible()

CTipbarAccessible::CTipbarAccessible ( CTipbarAccItem pItem)

Definition at line 2066 of file msutb.cpp.

2067{
2068 m_cRefs = 1;
2069 m_hWnd = NULL;
2070 m_pTypeInfo = NULL;
2073 m_cSelection = 1;
2074 m_AccItems.Add(pItem);
2075 ++g_DllRefCount;
2076}
BOOL m_bInitialized
Definition: msutb.cpp:770
IAccessible * m_pStdAccessible
Definition: msutb.cpp:768
ITypeInfo * m_pTypeInfo
Definition: msutb.cpp:769
CicArray< CTipbarAccItem * > m_AccItems
Definition: msutb.cpp:771
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 2078 of file msutb.cpp.

2079{
2081 if (m_pTypeInfo)
2082 {
2084 m_pTypeInfo = NULL;
2085 }
2086 if (m_pStdAccessible)
2087 {
2090 }
2091 --g_DllRefCount;
2092}
ULONG Release()

Member Function Documentation

◆ accDoDefaultAction()

STDMETHODIMP CTipbarAccessible::accDoDefaultAction ( VARIANT  varID)

Implements IAccessible.

Definition at line 2558 of file msutb.cpp.

2559{
2560 if (V_VT(&varID) != VT_I4)
2561 return E_INVALIDARG;
2562 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2563 if (!pItem)
2564 return DISP_E_MEMBERNOTFOUND;
2565 return (pItem->DoAccDefaultAction() ? S_OK : S_FALSE);
2566}
CTipbarAccItem * AccItemFromID(INT iItem)
Definition: msutb.cpp:2140
#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 2523 of file msutb.cpp.

2524{
2525 if (!pvarID)
2526 return E_INVALIDARG;
2527 POINT Point = { left, top };
2528 RECT Rect;
2531
2532 if (!::PtInRect(&Rect, Point))
2533 {
2534 V_VT(pvarID) = VT_EMPTY;
2535 return S_OK;
2536 }
2537
2538 V_VT(pvarID) = VT_I4;
2539 V_I4(pvarID) = 0;
2540
2541 for (size_t iItem = 1; iItem < m_AccItems.size(); ++iItem)
2542 {
2543 CTipbarAccItem *pItem = m_AccItems[iItem];
2544 if (pItem)
2545 {
2546 pItem->GetAccLocation(&Rect);
2547 if (::PtInRect(&Rect, Point))
2548 {
2549 V_I4(pvarID) = iItem;
2550 break;
2551 }
2552 }
2553 }
2554
2555 return S_OK;
2556}
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 2140 of file msutb.cpp.

2141{
2142 if (iItem < 0 || (INT)m_AccItems.size() <= iItem)
2143 return NULL;
2144 return m_AccItems[iItem];
2145}
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 2450 of file msutb.cpp.

2456{
2457 if (!left || !top || !width || !height)
2458 return E_INVALIDARG;
2459
2460 if (!V_I4(&varID))
2461 return m_pStdAccessible->accLocation(left, top, width, height, varID);
2462
2463 RECT rc;
2464 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2465 pItem->GetAccLocation(&rc);
2466
2467 *left = rc.left;
2468 *top = rc.top;
2469 *width = rc.right - rc.left;
2470 *height = rc.bottom - rc.top;
2471 return S_OK;
2472}
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 2474 of file msutb.cpp.

2478{
2479 if (m_AccItems.size() <= 1)
2480 {
2481 V_VT(pvarEnd) = VT_EMPTY;
2482 return S_OK;
2483 }
2484
2485 switch (dir)
2486 {
2487 case NAVDIR_UP:
2488 case NAVDIR_LEFT:
2489 case NAVDIR_PREVIOUS:
2490 V_VT(pvarEnd) = VT_I4;
2491 V_I4(pvarEnd) = V_I4(&varStart) - 1;
2492 if (V_I4(&varStart) - 1 <= 0)
2493 V_I4(pvarEnd) = (INT)(m_AccItems.size() - 1);
2494 return S_OK;
2495
2496 case NAVDIR_DOWN:
2497 case NAVDIR_RIGHT:
2498 case NAVDIR_NEXT:
2499 V_VT(pvarEnd) = VT_I4;
2500 V_I4(pvarEnd) = V_I4(&varStart) + 1;
2501 if ((INT)m_AccItems.size() <= V_I4(&varStart) + 1)
2502 V_I4(pvarEnd) = 1;
2503 return S_OK;
2504
2505 case NAVDIR_FIRSTCHILD:
2506 V_VT(pvarEnd) = VT_I4;
2507 V_I4(pvarEnd) = 1;
2508 return S_OK;
2509
2510 case NAVDIR_LASTCHILD:
2511 V_VT(pvarEnd) = VT_I4;
2512 V_I4(pvarEnd) = (INT)(m_AccItems.size() - 1);
2513 return S_OK;
2514
2515 default:
2516 break;
2517 }
2518
2519 V_VT(pvarEnd) = VT_EMPTY;
2520 return S_OK;
2521}
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 2430 of file msutb.cpp.

2433{
2434 if ((flagsSelect & SELFLAG_ADDSELECTION) && (flagsSelect & SELFLAG_REMOVESELECTION))
2435 return E_INVALIDARG;
2436 if (flagsSelect & (SELFLAG_TAKEFOCUS | SELFLAG_ADDSELECTION | SELFLAG_EXTENDSELECTION))
2437 return S_FALSE;
2438 if (flagsSelect & SELFLAG_REMOVESELECTION)
2439 return S_OK;
2440 if (V_VT(&varID) != VT_I4)
2441 return E_INVALIDARG;
2442 if (flagsSelect & SELFLAG_TAKESELECTION)
2443 {
2444 m_cSelection = V_I4(&varID);
2445 return S_OK;
2446 }
2447 return S_FALSE;
2448}

◆ AddAccItem()

BOOL CTipbarAccessible::AddAccItem ( CTipbarAccItem pItem)

Definition at line 2117 of file msutb.cpp.

2118{
2119 return m_AccItems.Add(pItem);
2120}

Referenced by CTipbarItem::_AddedToUI().

◆ ClearAccItems()

void CTipbarAccessible::ClearAccItems ( )

Definition at line 2135 of file msutb.cpp.

2136{
2137 m_AccItems.clear();
2138}
void clear()
Definition: cicarray.h:36

◆ CreateRefToAccObj()

LONG_PTR CTipbarAccessible::CreateRefToAccObj ( WPARAM  wParam)

Definition at line 2157 of file msutb.cpp.

2158{
2159 return ::LresultFromObject(IID_IAccessible, wParam, this);
2160}
WPARAM wParam
Definition: combotst.c:138

◆ DoDefaultActionReal()

BOOL CTipbarAccessible::DoDefaultActionReal ( INT  nID)

Definition at line 2162 of file msutb.cpp.

2163{
2164 CTipbarAccItem *pItem = AccItemFromID(nID);
2165 if (!pItem)
2166 return FALSE;
2167 return pItem->DoAccDefaultActionReal();
2168}

◆ get_accChild()

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

Definition at line 2287 of file msutb.cpp.

2290{
2291 if (!ppdispChild)
2292 return E_INVALIDARG;
2293 *ppdispChild = NULL;
2294 return S_FALSE;
2295}

◆ get_accChildCount()

STDMETHODIMP CTipbarAccessible::get_accChildCount ( LONG pcountChildren)

Definition at line 2276 of file msutb.cpp.

2277{
2278 if (!pcountChildren)
2279 return E_INVALIDARG;
2280 INT cItems = (INT)m_AccItems.size();
2281 if (!cItems)
2282 return E_FAIL;
2283 *pcountChildren = cItems - 1;
2284 return S_OK;
2285}
#define E_FAIL
Definition: ddrawi.h:102

◆ get_accDefaultAction()

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

Definition at line 2410 of file msutb.cpp.

2413{
2414 if (!action)
2415 return E_INVALIDARG;
2416 *action = NULL;
2417
2418 if (V_VT(&varID) != VT_I4)
2419 return E_INVALIDARG;
2420
2421 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2422 if (!pItem)
2423 return DISP_E_MEMBERNOTFOUND;
2424 *action = pItem->GetAccDefaultAction();
2425 if (!*action)
2426 return S_FALSE;
2427 return S_OK;
2428}
const WCHAR * action
Definition: action.c:7509

◆ get_accDescription()

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

Definition at line 2327 of file msutb.cpp.

2330{
2331 if (!description)
2332 return E_INVALIDARG;
2333 return m_pStdAccessible->get_accDescription(varID, description);
2334}
const char * description
Definition: directx.c:2497

◆ get_accFocus()

STDMETHODIMP CTipbarAccessible::get_accFocus ( VARIANT pvarID)

Definition at line 2382 of file msutb.cpp.

2383{
2384 if (!pvarID)
2385 return E_INVALIDARG;
2386 V_VT(pvarID) = VT_EMPTY;
2387 return S_FALSE;
2388}

◆ get_accHelp()

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

Definition at line 2364 of file msutb.cpp.

2365{
2366 return DISP_E_MEMBERNOTFOUND;
2367}

◆ get_accHelpTopic()

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

Definition at line 2369 of file msutb.cpp.

2373{
2374 return DISP_E_MEMBERNOTFOUND;
2375}

◆ get_accKeyboardShortcut()

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

Definition at line 2377 of file msutb.cpp.

2378{
2379 return DISP_E_MEMBERNOTFOUND;
2380}

◆ get_accName()

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

Definition at line 2297 of file msutb.cpp.

2300{
2301 if (!pszName)
2302 return E_INVALIDARG;
2303 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2304 if (!pItem)
2305 return E_INVALIDARG;
2306 *pszName = pItem->GetAccName();
2307 if (!*pszName)
2308 return DISP_E_MEMBERNOTFOUND;
2309 return S_OK;
2310}

◆ get_accParent()

STDMETHODIMP CTipbarAccessible::get_accParent ( IDispatch **  ppdispParent)

Definition at line 2271 of file msutb.cpp.

2272{
2273 return m_pStdAccessible->get_accParent(ppdispParent);
2274}

◆ get_accRole()

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

Definition at line 2336 of file msutb.cpp.

2339{
2340 if (!role)
2341 return E_INVALIDARG;
2342 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2343 if (!pItem)
2344 return E_INVALIDARG;
2345 V_VT(role) = VT_I4;
2346 V_I4(role) = pItem->GetAccRole();
2347 return S_OK;
2348}

◆ get_accSelection()

STDMETHODIMP CTipbarAccessible::get_accSelection ( VARIANT pvarID)

Definition at line 2390 of file msutb.cpp.

2391{
2392 if (!pvarID)
2393 return E_INVALIDARG;
2394
2395 V_VT(pvarID) = VT_EMPTY;
2396
2397 INT cItems = (INT)m_AccItems.size();
2398 if (cItems < m_cSelection)
2399 return S_FALSE;
2400
2401 if (cItems > m_cSelection)
2402 {
2403 V_VT(pvarID) = VT_I4;
2404 V_I4(pvarID) = m_cSelection;
2405 }
2406
2407 return S_OK;
2408}

◆ get_accState()

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

Definition at line 2350 of file msutb.cpp.

2353{
2354 if (!state)
2355 return E_INVALIDARG;
2356 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2357 if (!pItem)
2358 return E_INVALIDARG;
2359 V_VT(state) = VT_I4;
2360 V_I4(state) = pItem->GetAccState();
2361 return S_OK;
2362}
static int state
Definition: maze.c:121

◆ get_accValue()

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

Definition at line 2312 of file msutb.cpp.

2315{
2316 if (!pszValue)
2317 return E_INVALIDARG;
2318 CTipbarAccItem *pItem = AccItemFromID(V_I4(&varID));
2319 if (!pItem)
2320 return E_INVALIDARG;
2321 *pszValue = pItem->GetAccValue();
2322 if (!*pszValue)
2323 return DISP_E_MEMBERNOTFOUND;
2324 return S_OK;
2325}

◆ GetIDOfItem()

INT CTipbarAccessible::GetIDOfItem ( CTipbarAccItem pTarget)

Definition at line 2147 of file msutb.cpp.

2148{
2149 for (size_t iItem = 0; iItem < m_AccItems.size(); ++iItem)
2150 {
2151 if (pTarget == m_AccItems[iItem])
2152 return (INT)iItem;
2153 }
2154 return -1;
2155}
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 2238 of file msutb.cpp.

2244{
2245 if (!m_pTypeInfo)
2246 return E_NOTIMPL;
2247 return m_pTypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
2248}
#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 2221 of file msutb.cpp.

2225{
2226 if (!ppTInfo)
2227 return E_INVALIDARG;
2228 *ppTInfo = NULL;
2229 if (iTInfo != 0)
2231 if (!m_pTypeInfo)
2232 return E_NOTIMPL;
2233 *ppTInfo = m_pTypeInfo;
2235 return S_OK;
2236}
ULONG AddRef()
#define TYPE_E_ELEMENTNOTFOUND
Definition: winerror.h:2539

◆ GetTypeInfoCount()

STDMETHODIMP CTipbarAccessible::GetTypeInfoCount ( UINT pctinfo)

Implements IDispatch.

Definition at line 2213 of file msutb.cpp.

2214{
2215 if (!pctinfo)
2216 return E_INVALIDARG;
2217 *pctinfo = (m_pTypeInfo == NULL);
2218 return S_OK;
2219}

◆ Initialize()

HRESULT CTipbarAccessible::Initialize ( )

Definition at line 2094 of file msutb.cpp.

2095{
2097
2099 (void **)&m_pStdAccessible);
2100 if (FAILED(hr))
2101 return hr;
2102
2103 ITypeLib *pTypeLib;
2104 hr = ::LoadRegTypeLib(LIBID_Accessibility, 1, 0, 0, &pTypeLib);
2105 if (FAILED(hr))
2106 hr = ::LoadTypeLib(L"OLEACC.DLL", &pTypeLib);
2107
2108 if (SUCCEEDED(hr))
2109 {
2110 hr = pTypeLib->GetTypeInfoOfGuid(IID_IAccessible, &m_pTypeInfo);
2111 pTypeLib->Release();
2112 }
2113
2114 return hr;
2115}
#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 2250 of file msutb.cpp.

2259{
2260 if (!m_pTypeInfo)
2261 return E_NOTIMPL;
2262 return m_pTypeInfo->Invoke(this,
2263 dispIdMember,
2264 wFlags,
2265 pDispParams,
2266 pVarResult,
2267 pExcepInfo,
2268 puArgErr);
2269}
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 2170 of file msutb.cpp.

2171{
2172 INT nID = GetIDOfItem(pItem);
2173 if (nID < 0)
2174 return;
2175
2176 ::NotifyWinEvent(event, m_hWnd, -4, nID);
2177}
INT GetIDOfItem(CTipbarAccItem *pTarget)
Definition: msutb.cpp:2147
void NotifyWinEvent(DWORD event, CTipbarAccItem *pItem)
Definition: msutb.cpp:2170
struct _cl_event * event
Definition: glext.h:7739

Referenced by NotifyWinEvent().

◆ put_accName()

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

Definition at line 2568 of file msutb.cpp.

2569{
2570 return S_FALSE;
2571}

◆ put_accValue()

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

Definition at line 2573 of file msutb.cpp.

2574{
2575 return S_FALSE;
2576}

◆ QueryInterface()

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

Implements IUnknown.

Definition at line 2184 of file msutb.cpp.

2187{
2188 static const QITAB c_tab[] =
2189 {
2192 { NULL }
2193 };
2194 return ::QISearch(this, c_tab, riid, ppvObject);
2195}
REFIID riid
Definition: atlbase.h:39
#define QITABENT(Cthis, Ifoo)
Definition: shlwapi.h:2122
_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 2122 of file msutb.cpp.

2123{
2124 for (size_t iItem = 0; iItem < m_AccItems.size(); ++iItem)
2125 {
2126 if (m_AccItems[iItem] == pItem)
2127 {
2128 m_AccItems.Remove(iItem, 1);
2129 break;
2130 }
2131 }
2132 return S_OK;
2133}
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 2179 of file msutb.cpp.

2180{
2181 m_hWnd = hWnd;
2182}
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 774 of file msutb.cpp.

◆ CUTBMenuWnd

friend class CUTBMenuWnd
friend

Definition at line 773 of file msutb.cpp.

Member Data Documentation

◆ m_AccItems

◆ m_bInitialized

BOOL CTipbarAccessible::m_bInitialized
protected

Definition at line 770 of file msutb.cpp.

Referenced by CTipbarAccessible(), and Initialize().

◆ m_cRefs

LONG CTipbarAccessible::m_cRefs
protected

Definition at line 766 of file msutb.cpp.

Referenced by CTipbarAccessible().

◆ m_cSelection

LONG CTipbarAccessible::m_cSelection
protected

Definition at line 772 of file msutb.cpp.

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

◆ m_hWnd

HWND CTipbarAccessible::m_hWnd
protected

Definition at line 767 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: