[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/gui.cpp server/character.h ...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gui.cpp server/character.h ... |
Date: |
Thu, 18 Oct 2007 14:13:04 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/10/18 14:13:04
Modified files:
. : ChangeLog
gui : gui.cpp
server : character.h edit_text_character.h
movie_root.cpp movie_root.h
Log message:
* server/movie_root.{cpp,h}: add getActiveEntityUnderPointer
method.
* server/character.h: add virtual isSelectableTextField()
method.
* server/edit_text_character.h: implement
isSelectableTextField()
* gui/gui.cpp: use getActiveENtityUnderPointer and
isSelectableTextField to provide an INPUT cursor rather then
an HAND when the active entity under pointer is a selectable
text field.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4632&r2=1.4633
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.108&r2=1.109
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.100&r2=1.101
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.111&r2=1.112
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.81&r2=1.82
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4632
retrieving revision 1.4633
diff -u -b -r1.4632 -r1.4633
--- ChangeLog 18 Oct 2007 13:51:32 -0000 1.4632
+++ ChangeLog 18 Oct 2007 14:13:03 -0000 1.4633
@@ -1,5 +1,15 @@
2007-10-18 Sandro Santilli <address@hidden>
+ * server/movie_root.{cpp,h}: add getActiveEntityUnderPointer method.
+ * server/character.h: add virtual isSelectableTextField() method.
+ * server/edit_text_character.h: implement isSelectableTextField()
+ * gui/gui.cpp: use getActiveENtityUnderPointer and
+ isSelectableTextField to provide an INPUT cursor rather then
+ an HAND when the active entity under pointer is a selectable
+ text field.
+
+2007-10-18 Sandro Santilli <address@hidden>
+
* server/: movie_root.{cpp,h}, edit_text_character.cpp:
Renamed movie_root::{get,set}_active_entity to
movie_root::{get,set}Focus for clarity, and documented it.
Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- gui/gui.cpp 10 Oct 2007 07:45:28 -0000 1.108
+++ gui/gui.cpp 18 Oct 2007 14:13:03 -0000 1.109
@@ -317,9 +317,20 @@
display(m);
}
- if ( m->isMouseOverActiveEntity() ) {
+ character* activeEntity = m->getActiveEntityUnderPointer();
+ if ( activeEntity )
+ {
+ if ( activeEntity->isSelectableTextField() )
+ {
+ setCursor(CURSOR_INPUT);
+ }
+ else
+ {
setCursor(CURSOR_HAND);
- } else {
+ }
+ }
+ else
+ {
setCursor(CURSOR_NORMAL);
}
Index: server/character.h
===================================================================
RCS file: /sources/gnash/gnash/server/character.h,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- server/character.h 16 Oct 2007 09:24:49 -0000 1.100
+++ server/character.h 18 Oct 2007 14:13:03 -0000 1.101
@@ -19,7 +19,7 @@
//
//
-/* $Id: character.h,v 1.100 2007/10/16 09:24:49 strk Exp $ */
+/* $Id: character.h,v 1.101 2007/10/18 14:13:03 strk Exp $ */
#ifndef GNASH_CHARACTER_H
#define GNASH_CHARACTER_H
@@ -720,9 +720,6 @@
return get_relative_target_common(name);
}
- //virtual size_t get_current_frame() const { assert(0); return 0; }
- //virtual bool has_looped() const { assert(0); return false; }
-
/// Restart the character
//
/// This is only meaningful for sprite instances, but default
@@ -746,6 +743,7 @@
// GNASH_REPORT_FUNCTION
}
+ // TODO: verify if this is really needed (I guess not)
virtual void goto_frame(size_t /*target_frame*/) {}
/// \brief
@@ -1121,6 +1119,13 @@
#ifdef NEW_KEY_LISTENER_LIST_DESIGN
boost::intrusive_ptr<as_function> getUserDefinedEventHandler(const
std::string& name) const;
#endif
+
+ /// Return true if this character is a selectable TextField
+ //
+ /// This method is used by Gui to set up an appropriate cursor
+ /// for input textfields.
+ ///
+ bool virtual isSelectableTextField() const { return false; }
};
Index: server/edit_text_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- server/edit_text_character.h 18 Oct 2007 11:47:54 -0000 1.56
+++ server/edit_text_character.h 18 Oct 2007 14:13:04 -0000 1.57
@@ -272,6 +272,11 @@
_selectable = v;
}
+ // See character::isActiveTextField
+ bool virtual isSelectableTextField() const
+ {
+ return isSelectable();
+ }
private:
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -b -r1.111 -r1.112
--- server/movie_root.cpp 18 Oct 2007 13:51:33 -0000 1.111
+++ server/movie_root.cpp 18 Oct 2007 14:13:04 -0000 1.112
@@ -1081,6 +1081,12 @@
assert(testInvariant());
}
+character*
+movie_root::getActiveEntityUnderPointer() const
+{
+ return m_mouse_button_state.m_active_entity.get();
+}
+
bool
movie_root::isMouseOverActiveEntity() const
{
Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- server/movie_root.h 18 Oct 2007 13:51:33 -0000 1.81
+++ server/movie_root.h 18 Oct 2007 14:13:04 -0000 1.82
@@ -15,7 +15,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: movie_root.h,v 1.81 2007/10/18 13:51:33 strk Exp $ */
+/* $Id: movie_root.h,v 1.82 2007/10/18 14:13:04 strk Exp $ */
/// \page events_handling Handling of user events
///
@@ -520,6 +520,17 @@
DSOEXPORT void add_invalidated_bounds(InvalidatedRanges& ranges, bool
force);
+ /// Return the topmost active entity under the pointer
+ //
+ /// This method returns cached info, with cache updated
+ /// by notify_mouse_moved (and should be updated also
+ /// by movie advancement or actions execution maybe, not
+ /// currently implmented).
+ ///
+ /// @return the topmost active entity under pointer or NULL if none.
+ ///
+ character* getActiveEntityUnderPointer() const;
+
/// Return true if the mouse pointer is over an active entity
bool isMouseOverActiveEntity() const;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/gui.cpp server/character.h ...,
Sandro Santilli <=