503 Commits

Author SHA1 Message Date
Allan Odgaard
f5832c975f Add missing include statements 2016-06-22 18:31:49 +02:00
Allan Odgaard
371d426c5f Add ‘char const*’ insertion API to ng::buffer_t 2016-06-21 23:23:44 +02:00
Mike Meyer
91befc271b Read the gutter fontName from user defaults
defaults to textView fontName
2016-06-19 08:33:03 +02:00
Allan Odgaard
d2b29d69af Delete layout and editor objects before closing document
Both of these objects may observe the buffer owned by the document, so we should be sure the observers are gone since closing a document may delete its buffer.
2016-06-16 10:50:25 +02:00
Allan Odgaard
17574f3d0e Add crash log info to performDragOperation: 2016-06-13 13:02:49 +02:00
Allan Odgaard
c500e3073b Add document_t wrapper functions to document_view_t
This should make it possible to only deal with a document view (which retains the underlying document).
2016-06-13 13:02:49 +02:00
Allan Odgaard
18f4d8fc83 Minor simplification of document_view_t API 2016-06-13 13:02:49 +02:00
Allan Odgaard
3700332f3e Change how we obtain visible range for accessibility
This is so that we can remove the index_below function from document_view_t.
2016-06-13 13:02:49 +02:00
Allan Odgaard
a340811771 Allow access to buffer_t’s raw storage via the visitor interface
Previously this was done by exposing iterators but for this to go into the abstract base class we sort of need abstract iterators and that is too complex and visitor interface is sufficient for our single use case.
2016-06-13 13:02:49 +02:00
Allan Odgaard
b5747ec6a6 Return text::indent_t by value so we can create it on the fly 2016-06-13 13:02:49 +02:00
Allan Odgaard
43849342c6 Make find_gutter_view helper function private 2016-06-13 13:02:49 +02:00
Allan Odgaard
a88ef64c13 Move the undo grouping nest counter to document_view_t
This fixes a problem introduced by 3812a8d1fd3a5c4cf964f15ceeeca529238bc35b where we could end up not closing an undo group because the OakTextView’s document was changed before destruction of the refresh_helper_t.
2016-06-13 13:02:49 +02:00
Allan Odgaard
dcb306175c Limit information exposure 2016-06-13 13:02:49 +02:00
Allan Odgaard
d1bcb9f401 Simplify undo/redo API 2016-06-13 13:02:48 +02:00
Allan Odgaard
3747ee8e8f Rename a few member functions 2016-06-13 13:02:48 +02:00
Allan Odgaard
d544b38a33 Remove unnecessary method signature from OakTextView interface 2016-06-13 13:02:48 +02:00
Allan Odgaard
ca424bc504 Move reading of document specific settings to document_view_t 2016-06-13 13:02:48 +02:00
Allan Odgaard
fe84c5af48 Move document open/close management to document_view_t 2016-06-13 13:02:48 +02:00
Allan Odgaard
63b15949de Use member data variable instead of constructor argument 2016-06-13 13:02:48 +02:00
Allan Odgaard
d2259f7333 Don’t mirror wrap column instance data in OakTextView 2016-06-13 13:02:46 +02:00
Allan Odgaard
b2ce37f1c4 Add getter for a layout’s wrap column
Also rename wrapping member function to soft_wrap.
2016-06-13 13:01:11 +02:00
Allan Odgaard
9f1778f7a8 Remove document_view_t’s as_string member function 2016-06-13 13:01:11 +02:00
Allan Odgaard
4a4629e350 Add variables member function to document_view_t 2016-06-13 13:01:10 +02:00
Allan Odgaard
436405244e Use a unique pointer for document_view_t’s layout_t member 2016-06-13 13:01:10 +02:00
Allan Odgaard
b45212f73d Make document_view_t’s document instance private 2016-06-13 13:01:10 +02:00
Allan Odgaard
998c0da999 Pass document_view_t when a buffer_api_t type is required 2016-06-13 13:01:10 +02:00
Allan Odgaard
db5120c940 Add buffer_api_t conformance to document_view_t 2016-06-13 13:01:10 +02:00
Allan Odgaard
9dc2eb0aee Make refresh_helper_t’s document requirement explicit 2016-06-13 13:01:10 +02:00
Allan Odgaard
0a58c4e44d Make document_view_t’s layout and editor instances private 2016-06-13 13:01:10 +02:00
Allan Odgaard
857ce3a2e1 Pass document_view_t to items_for_tab_expansion 2016-06-13 13:01:09 +02:00
Allan Odgaard
14eb6fdca4 Add refresh cycle wrappers to document_view_t 2016-06-13 13:01:09 +02:00
Allan Odgaard
18eb5b98a8 Remove layout_t argument from document_view_t::perform 2016-06-13 13:01:09 +02:00
Allan Odgaard
424f396c86 Add document_t::set_indent wrapper to document_view_t 2016-06-13 13:01:09 +02:00
Allan Odgaard
c1c92e21c1 Add namespace qualifier to some helper functions
This should make their origin more clear.
2016-06-13 13:01:09 +02:00
Allan Odgaard
e77049d55f Add buffer_t::operator[] wrapper to document_view_t 2016-06-13 13:01:09 +02:00
Allan Odgaard
7d7914c46b Add undo_manager_t wrapper functions to document_view_t 2016-06-13 13:01:09 +02:00
Allan Odgaard
03529a0184 Add buffer_t wrapper functions to document_view_t 2016-06-13 13:01:07 +02:00
Allan Odgaard
9be3c12879 Add editor_t wrapper functions to document_view_t 2016-06-13 13:00:39 +02:00
Allan Odgaard
3d175d3ff7 Add layout_t wrapper functions to document_view_t 2016-06-13 13:00:37 +02:00
Allan Odgaard
2a0a3b6172 Pass document_view_t to refresh helper instead of its members 2016-06-13 13:00:04 +02:00
Allan Odgaard
84d83c93ed Introduce wrapper for editor_t and layout_t
This is first step toward consolidation of document_t, buffer_t, editor_t, and layout_t.
2016-06-13 13:00:00 +02:00
Allan Odgaard
10e6527eaa Remove unused indentCorrections property from OakTextView
The intent was to expose indent settings via the UI which is still a goal, but we’ll do a lot of refactoring first, so removing unused public API to make refactoring simpler.
2016-06-13 12:59:31 +02:00
Allan Odgaard
b2940e56c9 Gutter images are only drawn as monochrome when isTemplate is YES
This allows adding color swatches to the gutter e.g. to show CSS colors.
2016-05-30 14:39:16 +02:00
Allan Odgaard
19b5b3f9a1 Add “Template” suffix to note, warning, error, and search images
If we fail to load an image by name then we try again with a “Template” suffix so that commands can still set marks using just `note`, `warning`, and `error`.

When loading by full path and the path (minus extension) has a “Template” suffix then we manually set the image’s template property to YES since the system only seems to do this for images loaded from bundles.
2016-05-30 14:30:45 +02:00
Allan Odgaard
0457c189c8 Add “Template” suffix to bookmark and folding gutter images
Currently we assume that all images are template images and thus render them as such, but this might change.
2016-05-30 13:57:51 +02:00
Allan Odgaard
417193e089 Update link dependencies for all targets
Some targets were including headers from frameworks not specified in their link dependencies. For a clean build this could cause an issue because the header was not available at the time of building the target.

The updated link dependencies are also based on what a target’s tests require. Ideally tests would have separate link dependencies, but as we don’t want to maintain this manually, this will have to wait until the build system automatically handles link dependencies.

Currently the commit command uses constants from the CommitWindow framework but should actually not be linked with it. However, the optimizer will strip dead code, so it should not result in much if any difference in the resulting binary and does solve a build dependency issue.
2016-05-07 13:00:55 +02:00
Josh Bernitt
263da53c81 Optionally draw a horizontal line for every tab stop
This can be toggled using View → Show/Hide Indent Guides or controlled per file type via the `showIndentGuides` setting in `.tm_properties`.
2016-05-02 19:58:01 +02:00
Per Persson
c5d7aa112d Add font size selection to print dialog 2016-04-27 22:08:36 +02:00
Allan Odgaard
2adf6aaf3c Enable layout constraints for the print panel auxiliary view
If this is not done, we get an “unable to simultaneously satisfy constraints” warning on 10.11.4 and possibly earlier versions. This is likely because the print dialog was redone to use layout constraints, but I don’t know which version of OS X nor do I know how this change affect the print dialog prior to the introduction of layout constraints.
2016-04-27 21:42:06 +02:00
Orta Therox
34fa11ab3d Add a horizontal 2px margin on the Folding closed indicator 2016-04-15 00:25:24 +07:00