ReactOS  0.4.13-dev-651-g5dbc677
CAvailableAppView Class Reference

Static Public Member Functions

static BOOL ShowAvailableAppInfo (INT Index)
 

Static Private Member Functions

static VOID InsertTextAfterLoaded_RichEdit (UINT uStringID, const ATL::CStringW &szText, DWORD StringFlags, DWORD TextFlags)
 
static VOID InsertLoadedTextNewl_RichEdit (UINT uStringID, DWORD StringFlags)
 
static VOID InsertVersionInfo_RichEdit (CAvailableApplicationInfo *Info)
 
static VOID InsertLicenseInfo_RichEdit (CAvailableApplicationInfo *Info)
 
static VOID InsertLanguageInfo_RichEdit (CAvailableApplicationInfo *Info)
 

Detailed Description

Definition at line 58 of file gui.cpp.

Member Function Documentation

◆ InsertLanguageInfo_RichEdit()

static VOID CAvailableAppView::InsertLanguageInfo_RichEdit ( CAvailableApplicationInfo Info)
inlinestaticprivate

Definition at line 134 of file gui.cpp.

135  {
136  if (!Info->HasLanguageInfo())
137  {
138  return;
139  }
140 
141  const INT nTranslations = Info->m_LanguageLCIDs.GetSize();
142  ATL::CStringW szLangInfo;
143  ATL::CStringW szLoadedTextAvailability;
144  ATL::CStringW szLoadedAInfoText;
145 
146  szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
147 
148  if (Info->HasNativeLanguage())
149  {
150  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
151  if (nTranslations > 1)
152  {
154  buf.LoadStringW(IDS_LANGUAGE_MORE_PLACEHOLDER);
155  szLangInfo.Format(buf, nTranslations - 1);
156  }
157  else
158  {
159  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
160  szLangInfo = L" (" + szLangInfo + L")";
161  }
162  }
163  else if (Info->HasEnglishLanguage())
164  {
165  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
166  if (nTranslations > 1)
167  {
170  szLangInfo.Format(buf, nTranslations - 1);
171  }
172  else
173  {
174  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
175  szLangInfo = L" (" + szLangInfo + L")";
176  }
177  }
178  else
179  {
180  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
181  }
182 
183  InsertRichEditText(szLoadedAInfoText, CFE_BOLD);
184  InsertRichEditText(szLoadedTextAvailability, NULL);
185  InsertRichEditText(szLangInfo, CFE_ITALIC);
186  }
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:201
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
#define CFE_BOLD
Definition: richedit.h:406
smooth NULL
Definition: ftsmooth.c:416
#define IDS_AINFO_LANGUAGES
Definition: resource.h:158
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:198
VOID InsertRichEditText(LPCWSTR szText, DWORD flags)
Definition: gui.cpp:1802
static const WCHAR L[]
Definition: oid.c:1250
#define CFE_ITALIC
Definition: richedit.h:407
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:203
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:202
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:199
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:200

Referenced by ShowAvailableAppInfo().

◆ InsertLicenseInfo_RichEdit()

static VOID CAvailableAppView::InsertLicenseInfo_RichEdit ( CAvailableApplicationInfo Info)
inlinestaticprivate

Definition at line 111 of file gui.cpp.

112  {
113  ATL::CStringW szLicense;
114  switch (Info->m_LicenseType)
115  {
116  case LICENSE_OPENSOURCE:
117  szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
118  break;
119  case LICENSE_FREEWARE:
120  szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
121  break;
122  case LICENSE_TRIAL:
123  szLicense.LoadStringW(IDS_LICENSE_TRIAL);
124  break;
125  default:
127  return;
128  }
129 
130  szLicense += L" (" + Info->m_szLicense + L")";
132  }
#define IDS_AINFO_LICENSE
Definition: resource.h:155
struct TraceInfo Info
#define CFE_BOLD
Definition: richedit.h:406
static const WCHAR L[]
Definition: oid.c:1250
#define IDS_LICENSE_FREEWARE
Definition: resource.h:194
static VOID InsertTextAfterLoaded_RichEdit(UINT uStringID, const ATL::CStringW &szText, DWORD StringFlags, DWORD TextFlags)
Definition: gui.cpp:60
#define IDS_LICENSE_TRIAL
Definition: resource.h:195
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:193

Referenced by ShowAvailableAppInfo().

◆ InsertLoadedTextNewl_RichEdit()

static VOID CAvailableAppView::InsertLoadedTextNewl_RichEdit ( UINT  uStringID,
DWORD  StringFlags 
)
inlinestaticprivate

Definition at line 73 of file gui.cpp.

75  {
76  ATL::CStringW szLoadedText;
77  if (szLoadedText.LoadStringW(uStringID))
78  {
79  InsertRichEditText(L"\n", 0);
80  InsertRichEditText(szLoadedText, StringFlags);
81  InsertRichEditText(L"\n", 0);
82  }
83  }
VOID InsertRichEditText(LPCWSTR szText, DWORD flags)
Definition: gui.cpp:1802
static const WCHAR L[]
Definition: oid.c:1250

Referenced by InsertVersionInfo_RichEdit().

◆ InsertTextAfterLoaded_RichEdit()

static VOID CAvailableAppView::InsertTextAfterLoaded_RichEdit ( UINT  uStringID,
const ATL::CStringW szText,
DWORD  StringFlags,
DWORD  TextFlags 
)
inlinestaticprivate

Definition at line 60 of file gui.cpp.

64  {
65  ATL::CStringW szLoadedText;
66  if (!szText.IsEmpty() && szLoadedText.LoadStringW(uStringID))
67  {
68  InsertRichEditText(szLoadedText, StringFlags);
69  InsertRichEditText(szText, TextFlags);
70  }
71  }
static const WCHAR szText[]
Definition: dialog.c:139
VOID InsertRichEditText(LPCWSTR szText, DWORD flags)
Definition: gui.cpp:1802

Referenced by InsertLicenseInfo_RichEdit(), InsertVersionInfo_RichEdit(), and ShowAvailableAppInfo().

◆ InsertVersionInfo_RichEdit()

static VOID CAvailableAppView::InsertVersionInfo_RichEdit ( CAvailableApplicationInfo Info)
inlinestaticprivate

Definition at line 85 of file gui.cpp.

86  {
87  if (Info->IsInstalled())
88  {
89  if (Info->HasInstalledVersion())
90  {
91  if (Info->HasUpdate())
93  else
95 
97  }
98  else
99  {
101  }
102  }
103  else
104  {
106  }
107 
109  }
#define IDS_AINFO_VERSION
Definition: resource.h:151
#define IDS_STATUS_INSTALLED
Definition: resource.h:183
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:157
struct TraceInfo Info
#define CFE_BOLD
Definition: richedit.h:406
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:186
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:184
#define CFE_ITALIC
Definition: richedit.h:407
static VOID InsertTextAfterLoaded_RichEdit(UINT uStringID, const ATL::CStringW &szText, DWORD StringFlags, DWORD TextFlags)
Definition: gui.cpp:60
static VOID InsertLoadedTextNewl_RichEdit(UINT uStringID, DWORD StringFlags)
Definition: gui.cpp:73

Referenced by ShowAvailableAppInfo().

◆ ShowAvailableAppInfo()

static BOOL CAvailableAppView::ShowAvailableAppInfo ( INT  Index)
inlinestatic

Definition at line 189 of file gui.cpp.

190  {
192  if (!Info) return FALSE;
193 
194  NewRichEditText(Info->m_szName, CFE_BOLD);
198 
203 
204  return TRUE;
205  }
DWORD_PTR ListViewGetlParam(INT item)
Definition: gui.cpp:1778
#define TRUE
Definition: types.h:120
static VOID InsertLicenseInfo_RichEdit(CAvailableApplicationInfo *Info)
Definition: gui.cpp:111
VOID NewRichEditText(LPCWSTR szText, DWORD flags)
Definition: gui.cpp:1797
#define IDS_AINFO_URLSITE
Definition: resource.h:154
#define CFE_LINK
Definition: richedit.h:411
struct TraceInfo Info
#define CFE_BOLD
Definition: richedit.h:406
static const UCHAR Index[8]
Definition: usbohci.c:18
static VOID InsertVersionInfo_RichEdit(CAvailableApplicationInfo *Info)
Definition: gui.cpp:85
static VOID InsertTextAfterLoaded_RichEdit(UINT uStringID, const ATL::CStringW &szText, DWORD StringFlags, DWORD TextFlags)
Definition: gui.cpp:60
#define IDS_AINFO_SIZE
Definition: resource.h:153
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:156
static VOID InsertLanguageInfo_RichEdit(CAvailableApplicationInfo *Info)
Definition: gui.cpp:134
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:152

Referenced by CMainWindow::ProcessWindowMessage().


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