]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GWorkArea.C
make it compile again
[lyx.git] / src / frontends / gtk / GWorkArea.C
index 35cbbc44992de04d298d28ad84296cbd63b2b917..9b4e3585fbe2d00fcd1b4607e2101c5348414422 100644 (file)
@@ -28,6 +28,8 @@
 #include "funcrequest.h"
 #include "LColor.h"
 #include "WorkArea.h"
+#include "Gui.h"
+#include "Selection.h"
 
 using boost::shared_ptr;
 
@@ -333,7 +335,7 @@ bool GWorkArea::onConfigure(GdkEventConfigure * /*event*/)
                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;
 }
 
@@ -376,8 +378,7 @@ void GWorkArea::onScroll()
        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;
 }
 
@@ -475,51 +476,22 @@ void GWorkArea::inputCommit(gchar * str)
 
 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