gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--fox-gui/gsl_shell_window.cpp 26
-rw-r--r--fox-gui/gsl_shell_window.h 3
2 files changed, 29 insertions, 0 deletions
diff --git a/fox-gui/gsl_shell_window.cpp b/fox-gui/gsl_shell_window.cpp
index 8c9d1459..ae37f41c 100644
--- a/fox-gui/gsl_shell_window.cpp
+++ b/fox-gui/gsl_shell_window.cpp
@@ -1,5 +1,6 @@
#include "gsl_shell_window.h"
#include "gsl_shell_app.h"
+#include "luajit.h"
#ifdef WIN32
#define CONSOLE_FONT "consolas"
@@ -12,6 +13,7 @@ FXDEFMAP(gsl_shell_window) gsl_shell_window_map[]=
FXMAPFUNC(SEL_CLOSE, 0, gsl_shell_window::on_close),
FXMAPFUNC(SEL_COMMAND, FXTopWindow::ID_CLOSE, gsl_shell_window::on_close),
FXMAPFUNC(SEL_CHANGED, gsl_shell_window::ID_CONSOLE, gsl_shell_window::on_change_console),
+ FXMAPFUNC(SEL_COMMAND, gsl_shell_window::ID_ABOUT, gsl_shell_window::on_cmd_about),
};
FXIMPLEMENT(gsl_shell_window,FXMainWindow,gsl_shell_window_map,ARRAYNUMBER(gsl_shell_window_map))
@@ -27,6 +29,10 @@ gsl_shell_window::gsl_shell_window(gsl_shell_thread* gs, FXApp* app, const FXStr
new FXMenuCommand(m_file_menu, "&Quit\tCtl-Q", NULL, this, FXTopWindow::ID_CLOSE);
new FXMenuTitle(m_menu_bar, "&File", NULL, m_file_menu);
+ m_help_menu = new FXMenuPane(this);
+ new FXMenuCommand(m_help_menu, "About", NULL, this, ID_ABOUT);
+ new FXMenuTitle(m_menu_bar, "&Help", NULL, m_help_menu, LAYOUT_RIGHT);
+
FXVerticalFrame* frame = new FXVerticalFrame(this, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y);
// Sunken border for text widget
@@ -54,3 +60,23 @@ long gsl_shell_window::on_change_console(FXObject*, FXSelector, void*)
{
return m_text->update_editable();
}
+
+
+long
+gsl_shell_window::on_cmd_about(FXObject*, FXSelector, void*)
+{
+ FXDialogBox about(this,"About GSL Shell",DECOR_TITLE|DECOR_BORDER,0,0,0,0, 0,0,0,0, 0,0);
+ FXVerticalFrame* side=new FXVerticalFrame(&about,LAYOUT_SIDE_RIGHT|LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 10,10,10,10, 0,0);
+ new FXLabel(side,"G S L S h e l l",NULL,JUSTIFY_LEFT|ICON_BEFORE_TEXT|LAYOUT_FILL_X);
+ new FXHorizontalSeparator(side,SEPARATOR_LINE|LAYOUT_FILL_X);
+ new FXLabel(side, FXStringFormat(
+ "GSL Shell %s, Copyright (C) 2009-2012 Francesco Abbate\n"
+ "GNU Scientific Library, Copyright (C) The GSL Team\n"
+ "%s -- %s\n",
+ GSL_SHELL_RELEASE, LUAJIT_VERSION, LUAJIT_COPYRIGHT),
+ NULL,JUSTIFY_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y);
+ FXButton *button=new FXButton(side,"&OK",NULL,&about,FXDialogBox::ID_ACCEPT,BUTTON_INITIAL|BUTTON_DEFAULT|FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT,0,0,0,0,32,32,2,2);
+ button->setFocus();
+ about.execute(PLACEMENT_OWNER);
+ return 1;
+}
diff --git a/fox-gui/gsl_shell_window.h b/fox-gui/gsl_shell_window.h
index 11ca3c3b..163134f1 100644
--- a/fox-gui/gsl_shell_window.h
+++ b/fox-gui/gsl_shell_window.h
@@ -24,10 +24,12 @@ public:
long on_close(FXObject* obj, FXSelector sel, void* ptr);
long on_change_console(FXObject* obj, FXSelector sel, void* ptr);
+ long on_cmd_about(FXObject* obj, FXSelector sel, void* ptr);
enum
{
ID_CONSOLE = FXMainWindow::ID_LAST,
+ ID_ABOUT,
};
protected:
@@ -38,6 +40,7 @@ private:
FXStatusBar* m_status_bar;
FXMenuBar* m_menu_bar;
FXMenuPane* m_file_menu;
+ FXMenuPane* m_help_menu;
FXFont* m_text_font;
};
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月02日 21:43:32 +0000

AltStyle によって変換されたページ (->オリジナル) /