Hugin trunk 0.1
Loading...
Searching...
No Matches
TextKillFocusHandler.cpp
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
27#include "hugin_config.h"
28#include "panoinc_WX.h"
29#include "panoinc.h"
31
38
43
45{
46 DEBUG_TRACE("Control ID:" << e.GetId());
47 // create a text changed event
48 // need to get id of the eve
49 if (dirty) {
50 DEBUG_DEBUG("forwarding focus change");
51 wxCommandEvent cmdEvt(wxEVT_COMMAND_TEXT_ENTER, e.GetId());
52 cmdEvt.SetEventObject(e.GetEventObject());
54 dirty = false;
55 }
56 e.Skip();
57}
58
59void TextKillFocusHandler::OnTextEnter(wxCommandEvent & e)
60{
61 DEBUG_TRACE("Control ID:" << e.GetId());
62 // create a text changed event
63 // need to get id of the event
64 if (dirty) {
65 // let the event through
66 dirty = false;
67 e.Skip();
68 } else {
69 // do not skip the event -> block
70 }
71}
72
73void TextKillFocusHandler::OnTextChange(wxCommandEvent & e)
74{
75 DEBUG_TRACE("Control ID:" << e.GetId());
76 // check if it was an enter event.
77 DEBUG_DEBUG("event: int: " << e.GetInt() << " sel: " << e.GetSelection()
78 << " string: " << e.GetString().mb_str(wxConvLocal));
79 dirty = true;
80 e.Skip();
81}
82
TextKillFocusHandler(wxWindow *parent)
ctor.
void OnTextEnter(wxCommandEvent &e)
void OnKillFocus(wxFocusEvent &e)
void OnTextChange(wxCommandEvent &e)
virtual ~TextKillFocusHandler()
dtor.
#define DEBUG_DEBUG(msg)
Definition utils.h:68
#define DEBUG_TRACE(msg)
Definition utils.h:67
include file for the hugin project
include file for the hugin project
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41