ardour.git
9 years agoDon't show all controllers for generic MIDI devices.
David Robillard [Mon, 14 Jul 2014 05:27:21 +0000 (01:27 -0400)]
Don't show all controllers for generic MIDI devices.

This takes a VERY long time to do, so is probably a problem for defined devices
with a ton of channels and devices, too.  Not sure what the smart thing to do
here is, though adding lanes really shouldn't be this slow in the first place.

9 years agoShow all named controllers for "Show All Automation" on MIDI tracks.
David Robillard [Mon, 14 Jul 2014 04:43:36 +0000 (00:43 -0400)]
Show all named controllers for "Show All Automation" on MIDI tracks.

9 years agoShow 1-based channel numbers in MIDI controller automation menu.
David Robillard [Mon, 14 Jul 2014 04:03:04 +0000 (00:03 -0400)]
Show 1-based channel numbers in MIDI controller automation menu.

This matches the numbers shown elsewhere, previously if you had a track set to
e.g. channel 10, the controller menu items had "[9]" suffixes.

9 years agoSupport midnam files with a channel (not patch) NoteNameList.
David Robillard [Mon, 14 Jul 2014 03:36:45 +0000 (23:36 -0400)]
Support midnam files with a channel (not patch) NoteNameList.

9 years agofix attempt at making -framework Accelerate arguments work correctly
Paul Davis [Tue, 15 Jul 2014 14:42:10 +0000 (10:42 -0400)]
fix attempt at making -framework Accelerate arguments work correctly

9 years agofix argument list for -framework Accelerate on OS X (arguments were fused into a...
Paul Davis [Tue, 15 Jul 2014 14:19:16 +0000 (10:19 -0400)]
fix argument list for -framework Accelerate on OS X (arguments were fused into a single string)

9 years agoAdd a couple of function calls so that Ardour will perform some basic cleanup when...
John Emmas [Tue, 15 Jul 2014 12:19:33 +0000 (13:19 +0100)]
Add a couple of function calls so that Ardour will perform some basic cleanup when the user exits

Up until now we were relying on various d'tors to do this cleanup for us. However, because we were calling 'exit()' (to terminate the program) those d'tors were never getting called. We should probably review the use of exit() as a termination strategy.

9 years agoremove some gtk warnings caused by adding monitor buttons without removing them first
Ben Loftis [Mon, 14 Jul 2014 21:05:31 +0000 (16:05 -0500)]
remove some gtk warnings caused by adding monitor buttons without removing them first

9 years agoicon for experimental time-zoom on Mixbus
Ben Loftis [Mon, 14 Jul 2014 17:20:58 +0000 (12:20 -0500)]
icon for experimental time-zoom on Mixbus

9 years agomake GUI preferences discoverable from the View menu
Ben Loftis [Mon, 14 Jul 2014 17:19:52 +0000 (12:19 -0500)]
make GUI preferences discoverable from the View menu

9 years agoscroll up/down by tracks uses top edge as "focal point"; fix some other nasty code...
Paul Davis [Mon, 14 Jul 2014 16:36:44 +0000 (12:36 -0400)]
scroll up/down by tracks uses top edge as "focal point"; fix some other nasty code details

9 years agovertical scroll events should move by tracks
Paul Davis [Mon, 14 Jul 2014 16:36:10 +0000 (12:36 -0400)]
vertical scroll events should move by tracks

9 years agoup/down scroll buttons on left of summary should move by tracks
Paul Davis [Mon, 14 Jul 2014 16:35:44 +0000 (12:35 -0400)]
up/down scroll buttons on left of summary should move by tracks

9 years agoif a button has an icon, dont draw text as well
Ben Loftis [Mon, 14 Jul 2014 15:28:50 +0000 (10:28 -0500)]
if a button has an icon, dont draw text as well

9 years agoGroup the Rec and Monitor buttons together. Group the Solo Isolate and Lock buttons...
Ben Loftis [Mon, 14 Jul 2014 15:08:38 +0000 (10:08 -0500)]
Group the Rec and Monitor buttons together.  Group the Solo Isolate and Lock buttons together.  And add a method to show/hide each group in the Preferences

9 years ago(Mixbus profile only) tentatively remove the Zoom and Cut tools, to save space in...
Ben Loftis [Fri, 11 Jul 2014 20:41:28 +0000 (15:41 -0500)]
(Mixbus profile only)  tentatively remove the Zoom and Cut tools, to save space in the toolbar and reduce some highly redundant functions

9 years agofix the visible_tracks_selector to show * when user tweaks a track height. various...
Ben Loftis [Fri, 11 Jul 2014 19:50:51 +0000 (14:50 -0500)]
fix the visible_tracks_selector to show * when user tweaks a track height.  various experimental tweaks to visible_tracks_selector and a new zoom_preset_selector for Mixbus.

9 years agoremove EditAtSelectedMarker for Mixbus, to match mb2. (also fix an existing thinko...
Ben Loftis [Wed, 9 Jul 2014 21:33:48 +0000 (16:33 -0500)]
remove EditAtSelectedMarker for Mixbus, to match mb2. (also fix an existing thinko in the edit point selection actions) (oops:  also fix previous track selection fix so that it pays attention to the selection property of the group)

9 years agominor fixes to wscript files to make things python3 compatible
Paul Davis [Sun, 13 Jul 2014 12:36:11 +0000 (08:36 -0400)]
minor fixes to wscript files to make things python3 compatible

9 years agonew waf (still version 1.6.11) incorporating previous autowaf.py change
Paul Davis [Sun, 13 Jul 2014 12:35:43 +0000 (08:35 -0400)]
new waf (still version 1.6.11) incorporating previous autowaf.py change

9 years agopython3 fix for autowaf.py
Paul Davis [Sun, 13 Jul 2014 12:35:21 +0000 (08:35 -0400)]
python3 fix for autowaf.py

9 years agoDummyBackend: add Uniform White Noise Generator.
Robin Gareus [Fri, 11 Jul 2014 16:05:59 +0000 (18:05 +0200)]
DummyBackend: add Uniform White Noise Generator.

9 years agopossible fix for win SystemExec::wait()
Robin Gareus [Fri, 11 Jul 2014 15:03:55 +0000 (17:03 +0200)]
possible fix for win SystemExec::wait()

if it does not help, use CREATE_NO_WINDOW and/or peek/pump messages :(

9 years agofatal error if vfork-exec-wrapper cannot be found (on unix systems).
Robin Gareus [Fri, 11 Jul 2014 14:39:55 +0000 (16:39 +0200)]
fatal error if vfork-exec-wrapper cannot be found (on unix systems).

9 years agoon linux, build ALSA backend as part of binary bundle, but don't include libdbus...
Paul Davis [Fri, 11 Jul 2014 14:40:45 +0000 (10:40 -0400)]
on linux, build ALSA backend as part of binary bundle, but don't include libdbus in bundle

9 years agoMerge branch 'cairocanvas' of git.ardour.org:ardour/ardour into cairocanvas
Paul Davis [Fri, 11 Jul 2014 13:59:59 +0000 (09:59 -0400)]
Merge branch 'cairocanvas' of git.ardour.org:ardour/ardour into cairocanvas

9 years agocorrectly copy vfork exec wrapper into right location in binary bundles on OS X and...
Paul Davis [Fri, 11 Jul 2014 13:59:36 +0000 (09:59 -0400)]
correctly copy vfork exec wrapper into right location in binary bundles on OS X and Linux

9 years agocatch null vfork_exec_wrapper before it is too late
Paul Davis [Fri, 11 Jul 2014 13:58:45 +0000 (09:58 -0400)]
catch null vfork_exec_wrapper before it is too late

9 years agoMake our 'libs/timecode' project dependent on libpbd
John Emmas [Fri, 11 Jul 2014 11:48:31 +0000 (12:48 +0100)]
Make our 'libs/timecode' project dependent on libpbd

This is needed because one of its source modules now references 'rint()' (which isn't available in MSVC, although we already simulate it in libbd).

9 years agoAdd newly introduced (MD5) sources to our MSVC project (also, add visibility stuff...
John Emmas [Fri, 11 Jul 2014 11:44:25 +0000 (12:44 +0100)]
Add newly introduced (MD5) sources to our MSVC project (also, add visibility stuff to the new MD5 class)

9 years agomove fit-tracks back onto "f" and use / for fade-range, moving set-region-fade-(in...
Paul Davis [Fri, 11 Jul 2014 10:19:20 +0000 (06:19 -0400)]
move fit-tracks back onto "f" and use / for fade-range, moving set-region-fade-(in|out)-length to PRIMARY-/ and PRIMARY-\ respectively

9 years agorestore correct functioning of fit-tracks, which was mistakenly removed because of...
Paul Davis [Fri, 11 Jul 2014 10:18:40 +0000 (06:18 -0400)]
restore correct functioning of fit-tracks, which was mistakenly removed because of a failure to understand its complexities

9 years agofix TC entry beyond 2^31 frames.
Robin Gareus [Thu, 10 Jul 2014 17:06:52 +0000 (19:06 +0200)]
fix TC entry beyond 2^31 frames.

9 years agoremove awful, inobvious, wrong and no longer necessary "_i_am_the_modifier" crap...
Paul Davis [Thu, 10 Jul 2014 15:54:59 +0000 (11:54 -0400)]
remove awful, inobvious, wrong and no longer necessary "_i_am_the_modifier" crap from RouteUI, except in one case where it might be useful

9 years agofix key editor resize behaviour
Paul Davis [Thu, 10 Jul 2014 15:53:39 +0000 (11:53 -0400)]
fix key editor resize behaviour

9 years agoadd reset bindings button to key bindings editor
Paul Davis [Thu, 10 Jul 2014 15:04:24 +0000 (11:04 -0400)]
add reset bindings button to key bindings editor

9 years agoadd Gtkmm2ext::Keyboard::reset_bindings()
Paul Davis [Thu, 10 Jul 2014 15:04:04 +0000 (11:04 -0400)]
add Gtkmm2ext::Keyboard::reset_bindings()

9 years agouse lower-case PROGRAM_NAME for user bindings file name
Paul Davis [Thu, 10 Jul 2014 15:01:21 +0000 (11:01 -0400)]
use lower-case PROGRAM_NAME for user bindings file name

9 years agomake f be bound to fade-range by default
Paul Davis [Thu, 10 Jul 2014 13:28:33 +0000 (09:28 -0400)]
make f be bound to fade-range by default

9 years agoadd "fade range" operation, bound to alt-f at present by default
Paul Davis [Thu, 10 Jul 2014 12:17:22 +0000 (08:17 -0400)]
add "fade range" operation, bound to alt-f at present by default

9 years agoadd libardour infrastructure for "fade range" edit operation
Paul Davis [Thu, 10 Jul 2014 12:16:55 +0000 (08:16 -0400)]
add libardour infrastructure for "fade range" edit operation

9 years agodo not call basename_nosuffix() before using matching_unsuffixed_filename_exists_in...
Paul Davis [Thu, 10 Jul 2014 12:16:27 +0000 (08:16 -0400)]
do not call basename_nosuffix() before using matching_unsuffixed_filename_exists_in() because the latter does that call itself.

As the code used to be, if we are testing for a candidate filename of aaa.bbb.ccc, the call strips .ccc and matching_... strips .bbb
resulting in a match with aaa, which is not intended at all.

9 years agoadd comment/doxygen doc
Paul Davis [Thu, 10 Jul 2014 12:14:41 +0000 (08:14 -0400)]
add comment/doxygen doc

9 years agoremove unused variable
Paul Davis [Thu, 10 Jul 2014 12:13:54 +0000 (08:13 -0400)]
remove unused variable

9 years agosize various ArdourDropdowns according to the pixel width, not character length,...
Paul Davis [Thu, 10 Jul 2014 02:41:29 +0000 (22:41 -0400)]
size various ArdourDropdowns according to the pixel width, not character length, of their various strings

9 years agoRevert "adjust horizontal-offset for snap/grid dropdown." Wrong fix for the problem.
Paul Davis [Thu, 10 Jul 2014 02:39:07 +0000 (22:39 -0400)]
Revert "adjust horizontal-offset for snap/grid dropdown." Wrong fix for the problem.

This reverts commit c90d35c4a14f6838907830522a9ca3b73e037f07.

9 years agoadjust horizontal-offset for snap/grid dropdown.
Robin Gareus [Wed, 9 Jul 2014 23:55:17 +0000 (01:55 +0200)]
adjust horizontal-offset for snap/grid dropdown.

9 years agouse standardized timecode formatting in verbose cursor
Paul Davis [Wed, 9 Jul 2014 23:16:03 +0000 (19:16 -0400)]
use standardized timecode formatting in verbose cursor

9 years agobreak out AudioClock::print_minsec() so that AudioClock and VerboseCursor can use...
Paul Davis [Wed, 9 Jul 2014 23:13:18 +0000 (19:13 -0400)]
break out AudioClock::print_minsec() so that AudioClock and VerboseCursor can use the same formatting code.

9 years agoverbose cursor should use primary clock mode even when showing a duration, not just...
Paul Davis [Wed, 9 Jul 2014 22:32:41 +0000 (18:32 -0400)]
verbose cursor should use primary clock mode even when showing a duration, not just absolute position

9 years agoadd Editor::edit_mode_strings to allow for i18n; correctly size ArdourDropdowns using...
Paul Davis [Wed, 9 Jul 2014 20:48:19 +0000 (16:48 -0400)]
add Editor::edit_mode_strings to allow for i18n; correctly size ArdourDropdowns using longest, translated strings

9 years agoadd std::string variant of set_size_request_to_display_given_string()
Paul Davis [Wed, 9 Jul 2014 20:47:42 +0000 (16:47 -0400)]
add std::string variant of set_size_request_to_display_given_string()

9 years agoadd mixbus profile which removes the tearoffs
Ben Loftis [Wed, 9 Jul 2014 20:11:58 +0000 (15:11 -0500)]
add mixbus profile which removes the tearoffs

9 years agoRevert "ardour loves narrow screens part one"
Robin Gareus [Wed, 9 Jul 2014 19:32:26 +0000 (21:32 +0200)]
Revert "ardour loves narrow screens part one"

This reverts commit d3d83eac9df8f7c56fd6fedcf001dffa52d7357a.
restore full-height of editor-mixer.

9 years agoreduce space around TearOff Tickmarks
Robin Gareus [Wed, 9 Jul 2014 19:32:13 +0000 (21:32 +0200)]
reduce space around TearOff Tickmarks

9 years agoshorten grid/snap label "Timecode" -> "TC"
Robin Gareus [Wed, 9 Jul 2014 19:31:35 +0000 (21:31 +0200)]
shorten grid/snap label "Timecode" -> "TC"

9 years agoautomatically set ArdourDropdown box width.
Robin Gareus [Wed, 9 Jul 2014 19:45:57 +0000 (21:45 +0200)]
automatically set ArdourDropdown box width.

..according to longest text in English.

9 years agopolish a few blemishes and add some comments
Ben Loftis [Wed, 9 Jul 2014 19:45:20 +0000 (14:45 -0500)]
polish a few blemishes and add some comments

9 years agofix range select so it picks up grouped tracks
Ben Loftis [Wed, 9 Jul 2014 19:34:00 +0000 (14:34 -0500)]
fix range select so it picks up grouped tracks

9 years agomake sure that copy constructors and operator= for ControlList pass along the _interp...
Paul Davis [Wed, 9 Jul 2014 18:29:57 +0000 (14:29 -0400)]
make sure that copy constructors and operator= for ControlList pass along the _interpolation value

9 years agomake AutomationList::operator==() private and abort() as its core, because it should...
Paul Davis [Wed, 9 Jul 2014 18:28:01 +0000 (14:28 -0400)]
make AutomationList::operator==() private and abort() as its core, because it should never be called/used.

Also make AutomationList::operator=() use ControlList::operator=() rather than try to reimplement it

9 years agonew scissors icon
Robin Gareus [Wed, 9 Jul 2014 17:40:54 +0000 (19:40 +0200)]
new scissors icon

9 years agoardour loves 1024px width screens
Robin Gareus [Wed, 9 Jul 2014 17:40:43 +0000 (19:40 +0200)]
ardour loves 1024px width screens

narrow mode toolbar for screens <= 1024px with

9 years agoardour loves narrow screens part one
Robin Gareus [Wed, 9 Jul 2014 16:16:50 +0000 (18:16 +0200)]
ardour loves narrow screens part one

move toolbar box above editor-canvas. Without-editor mixer
there is no change. With Editor-mixer it is now above the
mixer-strip.

This makes the toolbar [almost] fit on 1024px width.

9 years agoreduce actual size of tool_cut.png to avoid blowing up h-padding on all other tool...
Paul Davis [Wed, 9 Jul 2014 17:09:38 +0000 (13:09 -0400)]
reduce actual size of tool_cut.png to avoid blowing up h-padding on all other tool buttons

9 years agoadd new TRX-only function for unusual global-record-enable semantics
Paul Davis [Wed, 9 Jul 2014 16:07:05 +0000 (12:07 -0400)]
add new TRX-only function for unusual global-record-enable semantics

9 years agoremove debug output
Paul Davis [Wed, 9 Jul 2014 16:06:36 +0000 (12:06 -0400)]
remove debug output

9 years agofix crash initiated by never configuring track write sources when reloading a session...
Paul Davis [Wed, 9 Jul 2014 16:03:22 +0000 (12:03 -0400)]
fix crash initiated by never configuring track write sources when reloading a session, caused by earlier commits to avoid unnecessary write source resets

9 years agodo not return auditioner as part of Session::get_tracks()
Paul Davis [Wed, 9 Jul 2014 16:02:22 +0000 (12:02 -0400)]
do not return auditioner as part of Session::get_tracks()

9 years agoadd Session::get_tracks()
Paul Davis [Wed, 9 Jul 2014 15:29:26 +0000 (11:29 -0400)]
add Session::get_tracks()

9 years agoadd mutex to prevent concurrent session state saves.
Paul Davis [Wed, 9 Jul 2014 14:18:28 +0000 (10:18 -0400)]
add mutex to prevent concurrent session state saves.

Why wasn't this done 10 years ago?

9 years agodo not attempt to save undo history if it is empty, and do not do any part of history...
Paul Davis [Wed, 9 Jul 2014 14:10:44 +0000 (10:10 -0400)]
do not attempt to save undo history if it is empty, and do not do any part of history save if we're not going to write a new file

9 years agodon't save state when removing sources during session loading (though this should...
Paul Davis [Wed, 9 Jul 2014 14:09:49 +0000 (10:09 -0400)]
don't save state when removing sources during session loading (though this should no longer happen)

9 years agoonly reset AudioDiskstream write sources if the I/O configuration changed. Do not...
Paul Davis [Wed, 9 Jul 2014 14:09:14 +0000 (10:09 -0400)]
only reset AudioDiskstream write sources if the I/O configuration changed. Do not do this for connection changes etc.

9 years agocall Canvas::re_enter() at the end of a RegionCutDrag so that entered_regionview...
Paul Davis [Wed, 9 Jul 2014 01:37:49 +0000 (21:37 -0400)]
call Canvas::re_enter() at the end of a RegionCutDrag so that entered_regionview *might* be set

9 years agocut ops can start on automation tracks too
Paul Davis [Wed, 9 Jul 2014 01:36:05 +0000 (21:36 -0400)]
cut ops can start on automation tracks too

9 years agocut ops can start with the mouse pointer not over a region
Paul Davis [Wed, 9 Jul 2014 00:28:27 +0000 (20:28 -0400)]
cut ops can start with the mouse pointer not over a region

9 years agocut cursor follows grid
Paul Davis [Tue, 8 Jul 2014 20:08:31 +0000 (16:08 -0400)]
cut cursor follows grid

9 years agobolder scissor images to match existing tools more closely
Ben Loftis [Tue, 8 Jul 2014 19:59:16 +0000 (14:59 -0500)]
bolder scissor images to match existing tools more closely

9 years agofix thinko with split selections. also ignore follow_edits when we are splitting...
Ben Loftis [Tue, 8 Jul 2014 19:16:13 +0000 (14:16 -0500)]
fix thinko with split selections.  also ignore follow_edits when we are splitting, because the playlist freeze and the newly added regions cause the playhead to jump to unexpected locations

9 years agoadd --debug-symbols configure option.
Robin Gareus [Tue, 8 Jul 2014 16:40:26 +0000 (18:40 +0200)]
add --debug-symbols configure option.

This allows for --optimize --debug-symbols for profiling.

9 years agoDummy Backend: optimize random-number implementation
Robin Gareus [Tue, 8 Jul 2014 16:16:26 +0000 (18:16 +0200)]
Dummy Backend: optimize random-number implementation

9 years agofix and optimize DummyBackend generators
Robin Gareus [Tue, 8 Jul 2014 13:52:22 +0000 (15:52 +0200)]
fix and optimize DummyBackend generators

* use Wavetable for sine
* lock generator (concurrency issue)
* always initialize variables

9 years agowhen merging external source files into session folder, if a collision occurs, use...
Paul Davis [Tue, 8 Jul 2014 16:25:36 +0000 (12:25 -0400)]
when merging external source files into session folder, if a collision occurs, use the original file suffix in conjunction with md5 hash

9 years agoAdd PBD::get_suffix() for ripping file suffixes from paths
Paul Davis [Tue, 8 Jul 2014 16:24:56 +0000 (12:24 -0400)]
Add PBD::get_suffix() for ripping file suffixes from paths

9 years agoinitial implementation of "bring all media into session folder". Incomplete but basic...
Paul Davis [Tue, 8 Jul 2014 04:53:06 +0000 (00:53 -0400)]
initial implementation of "bring all media into session folder". Incomplete but basically functional for audio files

9 years agoadd operator-= variants for PBD::Searchpath
Paul Davis [Tue, 8 Jul 2014 04:50:09 +0000 (00:50 -0400)]
add operator-= variants for PBD::Searchpath

9 years agoadd MD5 implementation to wscript
Paul Davis [Tue, 8 Jul 2014 04:49:53 +0000 (00:49 -0400)]
add MD5 implementation to wscript

9 years agoadd cleaned up MD5 C++ implementation for general use
Paul Davis [Tue, 8 Jul 2014 04:49:33 +0000 (00:49 -0400)]
add cleaned up MD5 C++ implementation for general use

9 years agomake WINDOWS_KEY value propagate correctly into wscript files for use when generating...
Paul Davis [Mon, 7 Jul 2014 20:27:39 +0000 (16:27 -0400)]
make WINDOWS_KEY value propagate correctly into wscript files for use when generating key bindings

9 years agoupdate callgrind script and add some doc.
Robin Gareus [Mon, 7 Jul 2014 22:22:40 +0000 (00:22 +0200)]
update callgrind script and add some doc.

9 years agoxfade rects should only pop-up in Object mode, when they are focusable
Ben Loftis [Mon, 7 Jul 2014 20:34:20 +0000 (15:34 -0500)]
xfade rects should only pop-up in Object mode, when they are focusable

9 years agofix inconsistency in smart mode where it shows a trim cursor in the top half of the...
Ben Loftis [Mon, 7 Jul 2014 19:46:05 +0000 (14:46 -0500)]
fix inconsistency in smart mode where it shows a trim cursor in the top half of the region edge, but a click is actually going to start a range.  It is arguable that we _should_ allow trimming in the top half, but that is complicated.  This change is small and makes it consistent for now

9 years agofix copy paste error in selection
Ben Loftis [Mon, 7 Jul 2014 19:15:25 +0000 (14:15 -0500)]
fix copy paste error in selection

9 years agoadd signal generator modules to Dummy Backend.
Robin Gareus [Mon, 7 Jul 2014 14:23:23 +0000 (16:23 +0200)]
add signal generator modules to Dummy Backend.

9 years agofix build after copy-n-paste/code change collision
Paul Davis [Mon, 7 Jul 2014 14:21:47 +0000 (10:21 -0400)]
fix build after copy-n-paste/code change collision

9 years agosome code shuffling to make sure that cut mode always operates at the mouse location...
Paul Davis [Mon, 7 Jul 2014 14:13:19 +0000 (10:13 -0400)]
some code shuffling to make sure that cut mode always operates at the mouse location, with (maybe) the right regions

9 years agoremove leftover cruft from link-region-and-track removal
Ben Loftis [Mon, 7 Jul 2014 14:07:06 +0000 (09:07 -0500)]
remove leftover cruft from link-region-and-track removal

9 years agoremove all_group_active_button. if you want to operate on all tracks, choose select...
Ben Loftis [Sun, 6 Jul 2014 19:20:50 +0000 (14:20 -0500)]
remove all_group_active_button.   if you want to operate on all tracks, choose select-all-tracks ( ctrl+t in the mnemonic bindings ).  this is more explicit and allows safer use of the deselected-region-under-mouse operations

9 years agoadd icons for cut mouse mode button and cut cursor (both need improving)
Paul Davis [Mon, 7 Jul 2014 13:13:23 +0000 (09:13 -0400)]
add icons for cut mouse mode button and cut cursor (both need improving)