/////////////////////////////////////////////////////////////////////////////
-// Name: richedit.cpp
+// Name: samples/richtext/richtext.cpp
// Purpose: wxWidgets rich text editor sample
// Author: Julian Smart
// Modified by:
#include "wx/richtext/richtextctrl.h"
#include "wx/richtext/richtextstyles.h"
#include "wx/richtext/richtextxml.h"
+#include "wx/richtext/richtexthtml.h"
// ----------------------------------------------------------------------------
// resources
if (!path.empty())
{
- int fileType = 0;
int filterIndex = dialog.GetFilterIndex();
- if (filterIndex < (int) fileTypes.GetCount())
- fileType = fileTypes[filterIndex];
- else
- fileType = wxRICHTEXT_TYPE_TEXT;
+ int fileType = (filterIndex < (int) fileTypes.GetCount())
+ ? fileTypes[filterIndex]
+ : wxRICHTEXT_TYPE_TEXT;
m_richTextCtrl->LoadFile(path, fileType);
}
}