-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
203 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright Jean Pierre Cimalando 2018. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include "hyperlink_button.h" | ||
#include <FL/Fl_Window.H> | ||
|
||
Hyperlink_Button::Hyperlink_Button(int x, int y, int w, int h, const char *l) | ||
: Fl_Button(x, y, w, h, l) | ||
{ | ||
} | ||
|
||
int Hyperlink_Button::handle(int event) | ||
{ | ||
if (event == FL_ENTER) { | ||
Fl_Window *win = window(); | ||
win->cursor(FL_CURSOR_HAND); | ||
} | ||
else if (event == FL_LEAVE) { | ||
Fl_Window *win = window(); | ||
win->cursor(FL_CURSOR_DEFAULT); | ||
} | ||
|
||
return Fl_Button::handle(event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright Jean Pierre Cimalando 2018. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#pragma once | ||
#include <FL/Fl_Button.H> | ||
|
||
class Hyperlink_Button : public Fl_Button { | ||
public: | ||
Hyperlink_Button(int x, int y, int w, int h, const char *l = nullptr); | ||
int handle(int event) override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.