~haggai-eran/nux/rtl-rebased

« back to all changes in this revision

Viewing changes to NuxCore/Win32Dialogs/NWin32CustomDialog.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-21 23:49:15 UTC
  • mfrom: (508.1.2 nux-20)
  • Revision ID: jay.taoko@canonical.com-20111021234915-hnzakb5ndebica8i
* Removed custom Nux types: t_u32, t_s32, t_bool, ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
  ColorDialogOption::ColorDialogOption()
35
35
    : m_ReturnColor (0, 0, 0, 0)
36
36
  {
37
 
    for (t_u32 i = 0; i < NUX_COLOR_DIALOG_CUSTOM_COLOR; i++)
 
37
    for (unsigned int i = 0; i < NUX_COLOR_DIALOG_CUSTOM_COLOR; i++)
38
38
    {
39
39
      m_CustomColors[i] = (COLORREF) (0xFFFFFF);
40
40
    }
45
45
 
46
46
  }
47
47
 
48
 
  void ColorDialogOption::SetCustomColor (t_u32 index, t_u32 RGBColor)
 
48
  void ColorDialogOption::SetCustomColor (unsigned int index, unsigned int RGBColor)
49
49
  {
50
50
    nuxAssert (index < NUX_COLOR_DIALOG_CUSTOM_COLOR);
51
51
    m_CustomColors[index] = (COLORREF) RGBColor;
52
52
  }
53
53
 
54
 
  void ColorDialogOption::SetCustomColor (t_u32 index, BYTE R, BYTE G, BYTE B)
 
54
  void ColorDialogOption::SetCustomColor (unsigned int index, BYTE R, BYTE G, BYTE B)
55
55
  {
56
56
    nuxAssert (index < NUX_COLOR_DIALOG_CUSTOM_COLOR);
57
57
    m_CustomColors[index] = (COLORREF) ((R<<16)|(G<<8)|B);
98
98
 
99
99
  TCHAR *FileDialogOption::GetFormatedFilter()
100
100
  {
101
 
    t_size size = 0;
 
101
    size_t size = 0;
102
102
 
103
 
    for (t_u32 i = 0; i < NumFilters; i++)
 
103
    for (unsigned int i = 0; i < NumFilters; i++)
104
104
    {
105
105
      size += FilterDesc[i].Length() + Filters[i].Length() + 2; // + 2 for for the NULL char at the end of each string
106
106
    }
111
111
      delete [] FormattedFilter;
112
112
 
113
113
    FormattedFilter = new TCHAR[size];
114
 
    t_size l = 0;
 
114
    size_t l = 0;
115
115
 
116
 
    for (t_u32 i = 0; i < NumFilters; i++)
 
116
    for (unsigned int i = 0; i < NumFilters; i++)
117
117
    {
118
118
      Memcpy ( (void *) (FormattedFilter + l), *FilterDesc[i], FilterDesc[i].Length() );
119
119
      l += FilterDesc[i].Length();
214
214
      }
215
215
    }
216
216
 
217
 
    t_u32 error = ::CommDlgExtendedError();
 
217
    unsigned int error = ::CommDlgExtendedError();
218
218
    return FALSE;
219
219
  }
220
220