{"size": 1948, "ext": "scrbl", "max_stars_repo_path": "gui-doc/scribblings/framework/keymap.scrbl", "max_stars_repo_name": "jjsimpso/gui", "max_stars_repo_stars_event_min_datetime": "2015-03-17T22:11:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T15:09:34.000Z", "max_issues_repo_path": "gui-doc/scribblings/framework/keymap.scrbl", "max_issues_repo_name": "jjsimpso/gui", "max_issues_repo_issues_event_min_datetime": "2015-01-09T15:53:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:21:29.000Z", "max_forks_repo_path": "gui-doc/scribblings/framework/keymap.scrbl", "max_forks_repo_name": "jjsimpso/gui", "max_forks_repo_forks_event_min_datetime": "2015-01-08T13:03:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T21:49:09.000Z"}
{"max_stars_count": 65, "max_issues_count": 231, "max_forks_count": 89, "avg_line_length": 40.5833333333, "max_line_length": 102, "alphanum_fraction": 0.7032854209}
#lang scribble/doc
@(require scribble/manual scribble/extract)
@(require (for-label framework))
@(require (for-label scheme/gui))
@title{Keymap}

@definterface[keymap:aug-keymap<%> (keymap%)]{
  This keymap overrides some of the built in @racket[keymap%] methods to be
  able to extract the keybindings from the keymap.

  @defmethod*[(((get-chained-keymaps) (listof (is-a?/c keymap%))))]{
    Returns the list of keymaps that are chained to this one.
  }

  @defmethod*[(((get-map-function-table) hash?))]{
    Returns a hash-table that maps symbols naming key sequences to the names of
    the keymap functions the are bound to.
  }

  @defmethod*[(((get-map-function-table/ht (ht hash?)) hash?))]{
    This is a helper function for @method[keymap:aug-keymap<%>
    get-map-function-table] that returns a similar result, except it accepts a
    hash-table that it inserts the bindings into. It does not replace any
    bindings already in @racket[ht]. The result is different from
    @method[keymap:aug-keymap<%> get-map-function-table] only in that
    @racket[keymap:aug-keymap<%> get-map-function-table] will remove keybindings
    that are also have a prefix (since those keybindings are not active).
  }
}
@defmixin[keymap:aug-keymap-mixin (keymap%) (keymap:aug-keymap<%>)]{
  @defmethod*[#:mode override (((chain-to-keymap (next (is-a?/c keymap%)) (prefix? boolean?)) void))]{
    Keeps a list of the keymaps chained to this one.
  }

  @defmethod*[#:mode override (((remove-chained-keymap (keymap (is-a?/c keymap))) void))]{
    Keeps the list of the keymaps chained to this one up to date.
  }

  @defmethod*[#:mode override (((map-function (key-name string) (function-name string)) void))]{
    Keeps a separate record of the key names and functions that they are bound
    to in this keymap.
  }
}

@defclass[keymap:aug-keymap% (keymap:aug-keymap-mixin keymap%) ()]{}

@(include-previously-extracted "main-extracts.rkt" #rx"^keymap:")
