-2006-03-01 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+2006-03-14 Abdelrazak Younes <younes.a@free.fr>\r
+\r
+ * QWorkArea.[Ch]: Wheel one-liner mouse fix\r
+ * QWorkArea.C: Reverted to Q_WS_X11 and Q_WS_MACX instead of Q_OS_*\r
+ * QWorkArea.h: Added comments\r
+\r
+2006-03-12 Lars Gullik Bjønnes <larsbj@lyx.org>\r
+\r
+ * ui/pch.h: new file\r
+\r
+2006-03-11 Abdelrazak Younes <younes.a@free.fr>\r
+\r
+ * Various Compilation fixes for MacOSX. There is still a problem\r
+ with Dialog.C:275 which does not recognize \r
+\r
+2006-03-10 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* QLMenubar.h: compile fix for gcc-4.1.
-2006-03-01 Abdelrazak Younes <younes.a@free.fr>
+2006-03-10 Abdelrazak Younes <younes.a@free.fr>
* QWorkArea.[Ch] cleanup:
- Added private members workWidth_ and workHeight_ in order to
separate place at the end of QWorkArea.C.
- initial support for Wheel mouse (still does not work).
-2006-03-12 Lars Gullik Bjønnes <larsbj@lyx.org>
-
- * ui/pch.h: new file
-
2006-03-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* QWorkArea.C (getClipboard): convert MAC to UNIX line endings on OSX
*/
QMenuBar * QLMenubar::menuBar() const
{
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
return mac_menubar_.get();
#else
return owner_->menuBar();
void QLMenubar::macxMenuBarInit()
{
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
mac_menubar_.reset(new QMenuBar);
// this is the name of the menu that contains our special entries
#include "debug.h"
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
#include "kbmap.h"
#include "QLyXKeySym.h"
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
/// \todo Mac specific binding handling.
void QLPopupMenu::addBinding(string & label, MenuItem const & mi)
{
-#ifndef Q_OS_MACX
+#ifndef Q_WS_MACX
string const binding(mi.binding());
if (!binding.empty()) {
/// \todo Fix Mac specific menu hack
void QLPopupMenu::specialMacXmenuHack()
{
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
/* The qt/mac menu code has a very silly hack that
moves some menu entries that it recognizes by name
(e.g. "Preferences...") to the "LyX" menu. This
#include <X11/Xlib.h>
#endif
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
#include <Carbon/Carbon.h>
#include <support/lstrings.h>
using lyx::support::subst;
setInputMethodEnabled(true);
#endif
-#ifdef Q_OS_X11
+#ifdef Q_WS_X11
// doubleClickInterval() is 400 ms on X11 witch is just too long.
// On Windows and Mac OS X, the operating system's value is used.
// On Microsoft Windows, calling this function sets the double
QApplication::setDoubleClickInterval(300);
#endif
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
wa_ptr = this;
#endif
}
lyxerr[Debug::ACTION] << "getClipboard: " << (const char*) str << endl;
if (str.isNull())
return string();
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
// The MAC clipboard uses \r for lineendings, and we use \n
return subst(fromqstr(str), '\r', '\n');
#else
void QWorkArea::putClipboard(string const & str) const
{
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
// The MAC clipboard uses \r for lineendings, and we use \n
QApplication::clipboard()->setText(toqstr(subst(str, '\n', '\r')),
QClipboard::Selection);
void QWorkArea::wheelEvent(QWheelEvent * e)
{
verticalScrollBar()->setValue(verticalScrollBar()->value() - e->delta());
+ adjustViewWithScrollBar();\r
}
void QWorkArea::generateSyntheticMouseEvent()
////////////////////////////////////////////////////////////////////////
// Mac OSX specific stuff goes here...
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
namespace{
OSErr checkAppleEventForMissingParams(const AppleEvent& theAppleEvent)
{
AEDisposeDesc(&documentList);
return err;
}
-#endif // Q_OS_MACX
+#endif // Q_WS_MACX
#endif
public slots:
-
- void keyeventTimeout();
- void adjustViewWithScrollBar(int action);
+\r
+ /// Timeout event Slot for keyboard bufferring.\r
+ /// \todo This is not used currently in the code, remove?
+ void keyeventTimeout();\r
+\r
+ /// Adjust the LyX buffer view with the position of the scrollbar.\r
+ /**\r
+ * The action argument is not used in the the code, it is there\r
+ * only for the connection to the vertical srollbar signal which \r
+ * emits an 'int' action.\r
+ */
+ void adjustViewWithScrollBar(int action = 0);
private:
- ///
+ /// Buffer view width.
int workWidth_;
- ///
+\r
+ /// Buffer view height.\r
int workHeight_;
- /// our painter
+ /// Our painter.
QLPainter painter_;
/// The slot connected to SyntheticMouseEvent::timeout.
void generateSyntheticMouseEvent();
+ ///\r
SyntheticMouseEvent synthetic_mouse_event_;
/// the double buffered pixmap
boost::scoped_ptr<QPixmap> pixmap_;
+ /// \todo remove\r
QTimer step_timer_;
+\r
+ /// \todo remove\r
std::queue<boost::shared_ptr<QKeyEvent> > keyeventQueue_;
double_click dc_event_;
-
- bool scrolled_with_mouse_;
- bool scrolled_with_keyboard_;
};
#endif // QWORKAREA_H