anchor.diff:  	wxFrame:show(Window),
   	wxFrame:maximize(Window),
   	#main_window{window = Window, status_bar = StatusBar}.
  +
  +handle_wx_event(WxMessage, WxEvent) ->
  +	case gen_server:call(?MODULE, WxMessage) of
  +		skip -> 
  +			wxEvent:skip(WxEvent),
  +			ok;
  +		ok ->
  +			ok
  +	end.
   
   handle_paint(#wx{obj = Window}, _WxObject) ->
   	{Buffer, Caret, BlinkCaretState} = gen_server:call(?MODULE, {get_buffer}),
  
positive.code: 			ok
  	end,
  	wxFileDialog:destroy(FileDialog),
  	State;
  handle_key(#wxKey{type = char, keyCode = ?WXK_CTRL_Q}, #state{doc_set = #ee_doc_set{focus_doc = #ee_doc_view{pid = FocusDocPid}}} = State) ->
  	ee_buffer_server:close(FocusDocPid),
  	State;
  handle_key(#wxKey{type = char, keyCode = ?WXK_LEFT}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_left_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_RIGHT}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_right_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_UP}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_up_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_DOWN}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_down_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_HOME}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_to_line_start_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_END}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_to_line_end_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_PAGEUP}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_up_one_page_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_PAGEDOWN}, #state{win = #main_window{window = Window}, doc_set = DocSet0} = State) ->
  	{ok, DocSet1} = ee_doc_set:move_caret_down_one_page_in_focus_doc(DocSet0),
  	wxFrame:refresh(Window),
  	State#state{doc_set = DocSet1};
  handle_key(#wxKey{type = char, keyCode = ?WXK_RETURN}, #state{doc_set = DocSet0} = State) ->
  	%% TODO: Refactor so that doc_set internals are hidden.
  	#ee_doc_set{focus_doc = #ee_doc_view{pid = DocPid, buffer = Buffer, caret = #ee_caret{line_no = LineNo} = Caret0} = FocusDoc} = DocSet0,
  
negative.code: 	%% TODO: Simplify this caret movement.
  	Caret1 = ee_caret:move_to(Caret0#ee_caret{col_no = ColNo + 1}, Buffer),
  	DocSet1 = DocSet0#ee_doc_set{focus_doc = FocusDoc#ee_doc_view{caret = Caret1}},
  	{ok, State#state{doc_set = DocSet1}};
  handle_key(#wxKey{} = KeyEvent, State) ->
  	io:format("Ignored key event: ~p~n", [KeyEvent]),
  	{skip, State}.
  
  create_window() ->
  	%% Create the window.
  