#include "funcrequest.h"
#include "LColor.h"
#include "WorkArea.h"
+#include "Gui.h"
+#include "Selection.h"
using boost::shared_ptr;
gtk_im_context_set_client_window(
imContext_, workArea_.get_window()->gobj());
}
- view_.view()->workAreaResize(workArea_.get_width(), workArea_.get_height());
+ view_.workArea()->resizeBufferView();
return true;
}
adjusting_ = true;
double val = vscrollbar_.get_adjustment()->get_value();
- view_.view()->scrollDocView(static_cast<int>(val));
- view_.workArea()->redraw();
+ view_.workArea()->scrollBufferView(static_cast<int>(val));
adjusting_ = false;
}
bool GWorkArea::onKeyPress(GdkEventKey * event)
{
-#ifdef I18N
- inputCache_ = "";
- bool inputGet = gtk_im_context_filter_keypress(imContext_, event);
- // cope with ascii
- if ((inputGet && inputCache_.size() == 1 && inputCache_[0] < 128) ||
- !inputGet) {
-#endif
+// #ifdef I18N
+// inputCache_ = "";
+// bool inputGet = gtk_im_context_filter_keypress(imContext_, event);
+// // cope with ascii
+// if ((inputGet && inputCache_.size() == 1 && inputCache_[0] < 128) ||
+// !inputGet) {
+// #endif
GLyXKeySym *glk = new GLyXKeySym(event->keyval);
view_.workArea()->processKeySym(LyXKeySymPtr(glk),
gtkKeyState(event->state));
-#ifdef I18N
- } else if (!inputCache_.empty())
- workAreaCJK_IMprocess(inputCache_.size(), inputCache_.data());
-#endif
+// #ifdef I18N
+// } else if (!inputCache_.empty())
+// workAreaCJK_IMprocess(inputCache_.size(), inputCache_.data());
+// #endif
return true;
}
-
-void GWorkArea::onClipboardGet(Gtk::SelectionData & /*selection_data*/,
- guint /*info*/)
-{
- view_.view()->selectionRequested();
-}
-
-
-void GWorkArea::onClipboardClear()
-{
-// selectionLost();
-}
-
-
-void GWorkArea::haveSelection(bool toHave)
-{
- if (toHave) {
- Glib::RefPtr<Gtk::Clipboard> clipboard =
- Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
- std::vector<Gtk::TargetEntry> listTargets;
- listTargets.push_back(Gtk::TargetEntry("UTF8_STRING"));
- clipboard->set(listTargets,
- sigc::mem_fun(const_cast<GWorkArea&>(*this),
- &GWorkArea::onClipboardGet),
- sigc::mem_fun(const_cast<GWorkArea&>(*this),
- &GWorkArea::onClipboardClear));
- }
-}
-
} // namespace frontend
} // namespace lyx