NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
filetree.cpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19#include "filetree.hpp"
20#include "../globals.hpp"
21
22BEGIN_EVENT_TABLE(FileTree, wxTreeCtrl)
23// EVT_ENTER_WINDOW (FileTree::OnEnter)
25
26void FileTree::OnEnter(wxMouseEvent& event)
27{
28 if (g_findReplace != nullptr && g_findReplace->IsShown())
29 {
30 event.Skip();
31 return;
32 }
33 this->SetFocus();
34 event.Skip();
35}
36
37void FileTree::SetDnDHighlight(const wxTreeItemId& itemToHighLight)
38{
39 if (itemToHighLight == m_currentHighLight)
40 return;
41
42 if (m_currentHighLight.IsOk())
43 {
44 this->SetItemDropHighlight(m_currentHighLight, false);
45 m_currentHighLight = wxTreeItemId();
46 }
47 if (itemToHighLight.IsOk())
48 {
49 this->SetItemDropHighlight(itemToHighLight);
50 m_currentHighLight = itemToHighLight;
51 }
52}
void SetDnDHighlight(const wxTreeItemId &itemToHighLight)
Definition: filetree.cpp:37
wxTreeItemId m_currentHighLight
Definition: filetree.hpp:34
FindReplaceDialog * g_findReplace
END_EVENT_TABLE()