LibreOffice Module shell (master) 1
infotips.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SHELL_INC_INTERNAL_INFOTIPS_HXX
21#define INCLUDED_SHELL_INC_INTERNAL_INFOTIPS_HXX
22
23#include <objidl.h>
24#include <shlobj.h>
25#include <string>
26#include "filepath.hxx"
27
28class CInfoTip : public IQueryInfo, public IPersistFile
29{
30public:
31 CInfoTip(LONG RefCnt = 1);
32 virtual ~CInfoTip();
33
34
35 // IUnknown methods
36
37
38 virtual HRESULT STDMETHODCALLTYPE QueryInterface(
39 REFIID riid,
40 void __RPC_FAR *__RPC_FAR *ppvObject) override;
41
42 virtual ULONG STDMETHODCALLTYPE AddRef() override;
43
44 virtual ULONG STDMETHODCALLTYPE Release() override;
45
46
47 // IQueryInfo methods
48
49
50 virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetInfoTip(DWORD dwFlags, PWSTR* ppwszTip) override;
51
52 virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetInfoFlags(DWORD *pdwFlags) override;
53
54
55 // IPersist methods
56
57
58 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID* pClassID) override;
59
60
61 // IPersistFile methods
62
63
64 virtual HRESULT STDMETHODCALLTYPE IsDirty() override;
65
66 virtual HRESULT STDMETHODCALLTYPE Load(
67 /* [in] */ LPCOLESTR pszFileName,
68 /* [in] */ DWORD dwMode) override;
69
70 virtual HRESULT STDMETHODCALLTYPE Save(
71 /* [unique][in] */ LPCOLESTR pszFileName,
72 /* [in] */ BOOL fRemember) override;
73
74 virtual HRESULT STDMETHODCALLTYPE SaveCompleted(
75 /* [unique][in] */ LPCOLESTR pszFileName) override;
76
77 virtual HRESULT STDMETHODCALLTYPE GetCurFile(
78 /* [out] */ LPOLESTR __RPC_FAR *ppszFileName) override;
79
80private:
83 std::wstring m_FileNameOnly;
84};
85
86#endif
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual HRESULT STDMETHODCALLTYPE GetCurFile(LPOLESTR __RPC_FAR *ppszFileName) override
Definition: infotips.cxx:360
Filepath_char_t m_szFileName[MAX_PATH]
Definition: infotips.hxx:82
virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetInfoFlags(DWORD *pdwFlags) override
Definition: infotips.cxx:300
virtual HRESULT STDMETHODCALLTYPE SaveCompleted(LPCOLESTR pszFileName) override
Definition: infotips.cxx:354
virtual HRESULT STDMETHODCALLTYPE Save(LPCOLESTR pszFileName, BOOL fRemember) override
Definition: infotips.cxx:348
CInfoTip(LONG RefCnt=1)
Definition: infotips.cxx:42
virtual ULONG STDMETHODCALLTYPE AddRef() override
Definition: infotips.cxx:84
std::wstring m_FileNameOnly
Definition: infotips.hxx:83
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
Definition: infotips.cxx:59
virtual ULONG STDMETHODCALLTYPE Release() override
Definition: infotips.cxx:90
virtual HRESULT STDMETHODCALLTYPE IsDirty() override
Definition: infotips.cxx:342
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID) override
Definition: infotips.cxx:309
virtual HRESULT STDMETHODCALLTYPE Load(LPCOLESTR pszFileName, DWORD dwMode) override
Definition: infotips.cxx:319
virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetInfoTip(DWORD dwFlags, PWSTR *ppwszTip) override
Definition: infotips.cxx:194
virtual ~CInfoTip()
Definition: infotips.cxx:50
LONG m_RefCnt
Definition: infotips.hxx:81
char Filepath_char_t
Definition: filepath.hxx:21
#define MAX_PATH
const wchar_t *typedef BOOL
LONG