Am Donnerstag, 15. Juni 2006 11:43 schrieb Abdelrazak Younes:

> I didn't feel like changing the namespace everywhere so instead I just 
> put everything in lyx::frontend. We could still do the change afterward 
> if we feel it is needed.
> 
> This patch is going in "younes" branch now. Tested for qt3 and qt4.

qt4 does not compile on X11 and Mac (no WorkArea::view()), qt3 does not 
link and and gtk and xforms have compile errors too. Is the attached what 
you intended?


Georg
Index: src/frontends/gtk/GScreen.C
===================================================================
--- src/frontends/gtk/GScreen.C	(Revision 14120)
+++ src/frontends/gtk/GScreen.C	(Arbeitskopie)
@@ -74,13 +74,13 @@ void GScreen::showCursor(int x, int y, i
 	cursorH_ = h;
 
 	switch (shape) {
-	case lyx::GuiCursor::BAR_SHAPE:
+	case BAR_SHAPE:
 		cursorW_ = 1;
 		break;
-	case lyx::GuiCursor::L_SHAPE:
+	case L_SHAPE:
 		cursorW_ = cursorH_ / 3;
 		break;
-	case lyx::GuiCursor::REVERSED_L_SHAPE:
+	case REVERSED_L_SHAPE:
 		cursorW_ = cursorH_ / 3;
 		cursorX_ = x - cursorW_ + 1;
 		break;
@@ -105,10 +105,10 @@ void GScreen::showCursor(int x, int y, i
 				      x + owner_.xpos(),
 				      y + h - 1 + owner_.ypos());
 	switch (shape) {
-	case lyx::GuiCursor::BAR_SHAPE:
+	case BAR_SHAPE:
 		break;
-	case lyx::GuiCursor::L_SHAPE:
-	case lyx::GuiCursor::REVERSED_L_SHAPE:
+	case L_SHAPE:
+	case REVERSED_L_SHAPE:
 		owner_.getWindow()->draw_line(owner_.getGC(),
 					      owner_.xpos() + cursorX_,
 					      owner_.ypos() + y + h - 1,
Index: src/frontends/gtk/TheGui.h
===================================================================
--- src/frontends/gtk/TheGui.h	(Revision 14120)
+++ src/frontends/gtk/TheGui.h	(Arbeitskopie)
@@ -18,8 +18,8 @@
 #include "GScreen.h"
 #include "GWorkArea.h"
 
-#include "Clipboard.h"
-#include "WorkArea.h"
+#include "GuiClipboard.h"
+#include "GuiWorkArea.h"
 
 #include <boost/shared_ptr.hpp>
 
Index: src/frontends/qt3/QWorkArea.C
===================================================================
--- src/frontends/qt3/QWorkArea.C	(Revision 14120)
+++ src/frontends/qt3/QWorkArea.C	(Arbeitskopie)
@@ -102,6 +102,10 @@ void QWorkArea::setScrollbarParams(int h
 	scrollbar_->setPageStep(height());
 }
 
+} // namespace frontend
+} // namespace lyx
+
+
 #ifdef Q_WS_X11
 bool lyxX11EventFilter(XEvent * xev)
 {
@@ -187,6 +191,10 @@ pascal OSErr handleOpenDocuments(const A
 }
 #endif  // Q_WS_MACX
 
+
+namespace lyx {
+namespace frontend {
+
 void QWorkArea::haveSelection(bool own)
 {
 	wa_ptr = const_cast<QWorkArea*>(this);
Index: src/frontends/qt4/Application.C
===================================================================
--- src/frontends/qt4/Application.C	(Revision 14120)
+++ src/frontends/qt4/Application.C	(Arbeitskopie)
@@ -10,7 +10,7 @@
  * Full author contact details are available in file CREDITS.
  */
 
-#include "WorkArea.h"
+#include "GuiWorkArea.h"
 #include "Application.h"
 
 #include "qt_helpers.h"
@@ -59,7 +59,7 @@ Application::Application(int & argc, cha
 #endif
 }
 
-void Application::connect(WorkArea * work_area)
+void Application::connect(GuiWorkArea * work_area)
 {
 	work_area_ = work_area;
 }
Index: src/frontends/qt4/Application.h
===================================================================
--- src/frontends/qt4/Application.h	(Revision 14120)
+++ src/frontends/qt4/Application.h	(Arbeitskopie)
@@ -26,7 +26,7 @@
 namespace lyx {
 namespace frontend {
 
-class WorkArea;
+class GuiWorkArea;
 
 /// The Qt main application class
 /**
@@ -41,11 +41,11 @@ class Application : public QApplication
 public:
 	Application(int & argc, char ** argv);
 
-	void connect(WorkArea * work_area);
+	void connect(GuiWorkArea * work_area);
 
 private:
 	///
-	WorkArea * work_area_;
+	GuiWorkArea * work_area_;
 
 #ifdef Q_WS_X11
 public:
Index: src/frontends/xforms/xscreen.C
===================================================================
--- src/frontends/xforms/xscreen.C	(Revision 14120)
+++ src/frontends/xforms/xscreen.C	(Arbeitskopie)
@@ -83,13 +83,13 @@ void XScreen::showCursor(int x, int y, i
 	cursor_h_ = h;
 
 	switch (shape) {
-		case lyx::GuiCursor::BAR_SHAPE:
+		case BAR_SHAPE:
 			cursor_w_ = 1;
 			break;
-		case lyx::GuiCursor::L_SHAPE:
+		case L_SHAPE:
 			cursor_w_ = cursor_h_ / 3;
 			break;
-		case lyx::GuiCursor::REVERSED_L_SHAPE:
+		case REVERSED_L_SHAPE:
 			cursor_w_ = cursor_h_ / 3;
 			cursor_x_ = x - cursor_w_ + 1;
 			break;
@@ -120,10 +120,10 @@ void XScreen::showCursor(int x, int y, i
 		owner_.xpos() + x, owner_.ypos() + y + h - 1);
 
 	switch (shape) {
-		case lyx::GuiCursor::BAR_SHAPE:
+		case BAR_SHAPE:
 			break;
-		case lyx::GuiCursor::REVERSED_L_SHAPE:
-		case lyx::GuiCursor::L_SHAPE:
+		case REVERSED_L_SHAPE:
+		case L_SHAPE:
 			XDrawLine(fl_get_display(), owner_.getWin(), gc_copy,
 				owner_.xpos() + cursor_x_,
 				owner_.ypos() + y + h - 1,
Index: src/frontends/xforms/TheGui.h
===================================================================
--- src/frontends/xforms/TheGui.h	(Revision 14120)
+++ src/frontends/xforms/TheGui.h	(Arbeitskopie)
@@ -18,8 +18,8 @@
 #include "xscreen.h"
 #include "XWorkArea.h"
 
-#include "Clipboard.h"
-#include "WorkArea.h"
+#include "GuiClipboard.h"
+#include "GuiWorkArea.h"
 
 #include <boost/shared_ptr.hpp>
 

Reply via email to