Mercurial > octave-nkf
annotate gui/src/octave-adapter/octave-event.h @ 14714:4ff6c21c18c4 gui
Solved crash on close by ignoring close event and instead executing exit in the terminal.
* main-window.cc: Added invocation of 'exit' in the octave terminal.
* octave-link.h: Added include of octave-event.h.
* octave-event.h: Added base class for an octave event.
* src.pro: Added line to track octave-event.h.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Sat, 02 Jun 2012 14:44:50 +0200 |
parents | |
children | 3df7ef0080c7 |
rev | line source |
---|---|
14714
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
1 /* OctaveGUI - A graphical user interface for Octave |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
3 * |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
4 * This program is free software: you can redistribute it and/or modify |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
6 * published by the Free Software Foundation, either version 3 of the |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
7 * License, or (at your option) any later version. |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
8 * |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
13 * |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
16 */ |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
17 |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
18 #ifndef OCTAVEEVENT_H |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
19 #define OCTAVEEVENT_H |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
20 |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
21 /** |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
22 * \class octave_event |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
23 * \brief Base class for an octave event. |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
24 */ |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
25 class octave_event |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
26 { |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
27 public: |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
28 octave_event () |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
29 { |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
30 |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
31 } |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
32 |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
33 virtual ~octave_event () |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
34 { |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
35 |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
36 } |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
37 }; |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
38 |
4ff6c21c18c4
Solved crash on close by ignoring close event and instead executing exit in the terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
39 #endif // OCTAVEEVENT_H |