-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add type parameters to some structs (#55)
* add type parameter for cursor in UserInputState * add type parameter to file name in WidgetID * remove unused do_widget! method for CheckBox * add type parameter to InputButton * add type parameter for line and instance in WidgetID * add back unused do_widget! method for CheckBox. will remove it in different PR * remove unnecessary type constraint in reset! method * add type parameter to BoxLayout
- Loading branch information
1 parent
13d083d
commit b40115a
Showing
3 changed files
with
23 additions
and
23 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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
abstract type AbstractWidgetID end | ||
|
||
struct WidgetID <: AbstractWidgetID | ||
file::String | ||
line::Int | ||
instance::Int | ||
struct WidgetID{S, I} <: AbstractWidgetID | ||
file::S | ||
line::I | ||
instance::I | ||
end | ||
|
||
abstract type AbstractUserInteractionState end | ||
|
||
mutable struct UserInteractionState <: AbstractUserInteractionState | ||
hot_widget::WidgetID | ||
active_widget::WidgetID | ||
null_widget::WidgetID | ||
mutable struct UserInteractionState{S, I} <: AbstractUserInteractionState | ||
hot_widget::WidgetID{S, I} | ||
active_widget::WidgetID{S, I} | ||
null_widget::WidgetID{S, I} | ||
end | ||
|
||
const NULL_WIDGET_ID = WidgetID("", 0, 0) |