| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : gitCommitEditor.cpp |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#include "gitCommitEditor.h" |
| 27 |
|
| 28 |
#include "drawingutils.h" |
| 29 |
#include "lexer_configuration.h" |
| 30 |
#include "editor_config.h" |
| 31 |
|
| 32 |
GitCommitEditor::GitCommitEditor(wxWindow* parent, |
| 33 |
wxWindowID id, |
| 34 |
const wxPoint& position, |
| 35 |
const wxSize& size, |
| 36 |
long style) |
| 37 |
: wxStyledTextCtrl(parent, id, position, size, style | wxBORDER_THEME) |
| 38 |
{ |
| 39 |
InitStyles(); |
| 40 |
} |
| 41 |
|
| 42 |
void GitCommitEditor::InitStyles() |
| 43 |
{ |
| 44 |
LexerConf::Ptr_t diffLexer = EditorConfigST::Get()->GetLexer("Diff"); |
| 45 |
if(diffLexer) { |
| 46 |
diffLexer->Apply(this); |
| 47 |
this->SetLexer(wxSTC_LEX_DIFF); |
| 48 |
} |
| 49 |
} |