}
void Edit::OnCharAdded (wxStyledTextEvent &event) {
- char chr = event.GetKey();
+ char chr = (char)event.GetKey();
int currentLine = GetCurrentLine();
// Change this if support for mac files with \r is needed
if (chr == '\n') {
SetBackgroundColour (_T("WHITE"));
// about box shown for 1 seconds
- AppAbout (this, 1000);
+ AppAbout dlg(this, 1000);
// create menu
m_menuBar = new wxMenuBar;
}
void AppFrame::OnAbout (wxCommandEvent &WXUNUSED(event)) {
- AppAbout (this);
+ AppAbout dlg(this);
}
void AppFrame::OnExit (wxCommandEvent &WXUNUSED(event)) {
// properties event handlers
void AppFrame::OnProperties (wxCommandEvent &WXUNUSED(event)) {
if (!m_edit) return;
- EditProperties (m_edit, 0);
+ EditProperties dlg(m_edit, 0);
}
// print event handlers
{
// make the second colour slightly darker then the background
wxColour col = GetParent()->GetBackgroundColour();
- col.Set((col.Red() >> 1) + 20, (col.Green() >> 1) + 20, (col.Blue() >> 1) + 20);
+ col.Set((unsigned char)((col.Red() >> 1) + 20),
+ (unsigned char)((col.Green() >> 1) + 20),
+ (unsigned char)((col.Blue() >> 1) + 20));
newstyle.SetSecondColour(col);
}
{
currCol.Set(
(unsigned char)(col1.Red() + rf),
- (unsigned char)(col1.Green() + gf),
+ (unsigned char)(col1.Green() + gf),
(unsigned char)(col1.Blue() + bf)
);
dc.SetBrush( wxBrush( currCol, wxSOLID ) );
for(int x = rect.x; x < rect.x + rect.width; x++)
{
currCol.Set(
- (unsigned char)(col1.Red() + rf),
- (unsigned char)(col1.Green() + gf),
+ (unsigned char)(col1.Red() + rf),
+ (unsigned char)(col1.Green() + gf),
(unsigned char)(col1.Blue() + bf)
);
dc.SetBrush( wxBrush( currCol, wxSOLID ) );
}
void Edit::OnCharAdded (wxStyledTextEvent &event) {
- char chr = event.GetKey();
+ char chr = (char)event.GetKey();
int currentLine = GetCurrentLine();
// Change this if support for mac files with \r is needed
if (chr == '\n') {
SetBackgroundColour (_T("WHITE"));
// about box shown for 1 seconds
- AppAbout (this, 1000);
+ AppAbout dlg(this, 1000);
// create menu
m_menuBar = new wxMenuBar;
}
void AppFrame::OnAbout (wxCommandEvent &WXUNUSED(event)) {
- AppAbout (this);
+ AppAbout dlg(this);
}
void AppFrame::OnExit (wxCommandEvent &WXUNUSED(event)) {
// properties event handlers
void AppFrame::OnProperties (wxCommandEvent &WXUNUSED(event)) {
if (!m_edit) return;
- EditProperties (m_edit, 0);
+ EditProperties dlg(m_edit, 0);
}
// print event handlers