KiCad PCB EDA Suite
Loading...
Searching...
No Matches
library_editor_control.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2024 KiCad Developers, see AUTHORS.TXT for contributors.
5 *
6 * This program is free software; you can redistribute it and/or modify it under the terms of
7 * the GNU General Public License as published by the Free Software Foundation; either version 3
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program;
15 * if not, you may find one at http://www.gnu.org/licenses/
16 */
17
18#ifndef LIBRARY_EDITOR_CONTROL_H
19#define LIBRARY_EDITOR_CONTROL_H
20
22#include <project.h>
23
24
25class EDA_DRAW_FRAME;
26
31{
32public:
34
36 void Reset( RESET_REASON aReason ) override;
37
39
40 int PinLibrary( const TOOL_EVENT& aEvent );
41 int UnpinLibrary( const TOOL_EVENT& aEvent );
42 int ToggleLibraryTree( const TOOL_EVENT& aEvent );
43 int LibraryTreeSearch( const TOOL_EVENT& aEvent );
44
45 bool RenameLibrary( const wxString& aTitle, const wxString& aName,
46 std::function<bool( const wxString& aNewName )> aValidator );
47
48private:
50 void setTransitions() override;
51
53
54private:
56};
57
58#endif // LIBRARY_EDITOR_CONTROL_H
The base class for create windows for drawing purpose.
Module editor specific tools.
int UnpinLibrary(const TOOL_EVENT &aEvent)
int ToggleLibraryTree(const TOOL_EVENT &aEvent)
bool RenameLibrary(const wxString &aTitle, const wxString &aName, std::function< bool(const wxString &aNewName)> aValidator)
int PinLibrary(const TOOL_EVENT &aEvent)
int LibraryTreeSearch(const TOOL_EVENT &aEvent)
void setTransitions() override
< Set up handlers for various events.
void AddContextMenuItems(CONDITIONAL_MENU *aMenu)
RESET_REASON
Determine the reason of reset for a tool.
Definition: tool_base.h:78
Generic, UI-independent tool event.
Definition: tool_event.h:167
void Reset() override