Age | Commit message (Collapse) | Author |
|
When we have an abstract font class it makes no sense to keep
these methods in the Font class.
|
|
This patch removes size policies and preferred sizes, and replaces them
with min-size and max-size for each widget.
Box layout now works in 3 passes:
1) Set all items (widgets/spacers) to their min-size
2) Distribute remaining space evenly, respecting max-size
3) Place widgets one after the other, adding spacing in between
I've also added convenience helpers for setting a fixed size (which is
the same as setting min-size and max-size to the same value.)
This significantly reduces the verbosity of widget layout and makes GML
a bit more pleasant to write, too. :^)
|
|
|
|
Editors now communicate with the c++ language server when openning and
editing c++ source files, and go through the language server to get
autocomplete suggestions.
|
|
Previously, the GUI logic of HackStudio was all stuffed into main(),
and it started getting a bit out of hand :)
|
|
|
|
This also resolves some typing issues that only 'accidentally' worked, like declaring
a function to return type A, and the definition actually returning type B (which works
if type B is a subtype of type A). I like to call these "ninja imports".
To prevent problems like this in the future, I put all globals in a HackStudio.h.
I'm not sure about the name, but main.h and common.h felt wrong.
|
|
|
|
|
|
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
|
|
|
|
|
|
|
|
|
|
|
|
I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
|
|
This took me a moment. Welcome to the new world of GUI::Widget! :^)
|
|
|
|
This is a handy feature for any multi-line GTextEditor, so let's just
have it in the base widget. :^)
Fixes #1122.
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
Also make the editor filename label bold only for the current editor.
|
|
|
|
This patch adds Editor (subclass of GTextEditor) and EditorWrapper.
An EditorWrapper is a composite widget that adds a little statusbar
above an Editor widget. The statusbar is used for showing the filename
and the current cursor position. More things can definitely be added.
To get to the currently active editor, call current_editor().
You can also get to the current editor's wrapper by calling..
current_editor_wrapper(). Which editor is current is determined by
which was was last focused by the user.
|