libufo-commits Mailing List for UFO: Universal Form Objects (Page 3)
Status: Beta
Brought to you by:
schmidtjf
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(78) |
Oct
(69) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Johannes S. <sch...@us...> - 2005-10-18 15:59:57
|
Update of /cvsroot/libufo/ufo-0.5/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16586/src Modified Files: uvolatiledata.cpp Log Message: Changed UVolatileData to auto-registering at UDisplay. Index: uvolatiledata.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/uvolatiledata.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** uvolatiledata.cpp 21 May 2005 15:21:44 -0000 1.3 --- uvolatiledata.cpp 18 Oct 2005 15:59:47 -0000 1.4 *************** *** 43,48 **** --- 43,56 ---- m_display = UDisplay::getDefault(); } + if (m_display) { + m_display->addVolatileData(this); + } } + UVolatileData::~UVolatileData() { + if (m_display) { + m_display->removeVolatileData(this); + } + } bool |
|
From: Johannes S. <sch...@us...> - 2005-10-18 15:56:13
|
Update of /cvsroot/libufo/ufo-0.5/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15773/src Modified Files: uabstractdisplay.cpp Log Message: Fixed handling of volatile data. Removed referencing. Index: uabstractdisplay.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/uabstractdisplay.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** uabstractdisplay.cpp 18 Aug 2005 18:05:20 -0000 1.16 --- uabstractdisplay.cpp 18 Oct 2005 15:56:00 -0000 1.17 *************** *** 68,77 **** setDefault(NULL); } - // unreference volatile data - for(std::list<UVolatileData*>::iterator iter = m_volatileData.begin(); - iter != m_volatileData.end(); - ++iter) { - (*iter)->unreference(); - } } --- 68,71 ---- *************** *** 92,97 **** m_volatileData.end()) { m_volatileData.push_back(vdata); - // references the volatile data - vdata->reference(); } } --- 86,89 ---- *************** *** 104,108 **** if (iter != m_volatileData.end()) { m_volatileData.erase(iter); - vdata->unreference(); } } --- 96,99 ---- *************** *** 287,302 **** case UEvent::Refresh: { // refresh volatile data and remove unused data ! for(std::list<UVolatileData*>::iterator next_iter, iter = m_volatileData.begin(); ! iter != m_volatileData.end(); ! iter = next_iter) { ! next_iter = iter; ! ++next_iter; ! if ((*iter)->getReferenceCount() == 1) { ! // this object is ready for deletion ! (*iter)->unreference(); ! m_volatileData.erase(iter); ! } else { ! (*iter)->refresh(); ! } } // refresh contexts --- 278,287 ---- case UEvent::Refresh: { // refresh volatile data and remove unused data ! std::list<UVolatileData*>::iterator iter = m_volatileData.begin(); ! std::list<UVolatileData*>::iterator next_iter; ! while (iter != m_volatileData.end()) { ! next_iter = ++iter; ! (*iter)->refresh(); ! iter = next_iter; } // refresh contexts |
|
From: Johannes S. <sch...@us...> - 2005-10-17 16:40:11
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo/ux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23479/include/ufo/ux Modified Files: uxsdldriver.hpp uxwgldriver.hpp Log Message: Added virtual keyword for destructor. Index: uxsdldriver.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/ux/uxsdldriver.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** uxsdldriver.hpp 21 May 2005 15:17:23 -0000 1.7 --- uxsdldriver.hpp 17 Oct 2005 16:39:54 -0000 1.8 *************** *** 53,57 **** public: UXSDLDriver(const char * sdlPath = ""); ! ~UXSDLDriver(); public: // Implements UVideoDriver --- 53,57 ---- public: UXSDLDriver(const char * sdlPath = ""); ! virtual ~UXSDLDriver(); public: // Implements UVideoDriver Index: uxwgldriver.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/ux/uxwgldriver.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** uxwgldriver.hpp 21 May 2005 15:17:23 -0000 1.6 --- uxwgldriver.hpp 17 Oct 2005 16:39:54 -0000 1.7 *************** *** 57,61 **** public: UXWGLDriver(); ! ~UXWGLDriver(); public: // Implements UVideoDriver --- 57,61 ---- public: UXWGLDriver(); ! virtual ~UXWGLDriver(); public: // Implements UVideoDriver |
|
From: Johannes S. <sch...@us...> - 2005-10-17 16:39:41
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22786/src/widgets Modified Files: uwidget.cpp Log Message: Changed removeImpl(iterator) to removeImpl(int index). Made testState, setState(s), getState public. Index: uwidget.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uwidget.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** uwidget.cpp 30 Sep 2005 12:37:56 -0000 1.49 --- uwidget.cpp 17 Oct 2005 16:39:22 -0000 1.50 *************** *** 179,182 **** --- 179,183 ---- void UWidget::setVisible(bool v) { + // This explicitely shows/hides the widgets if (!v) { setState(WidgetForceInvisible); *************** *** 187,205 **** return; } ! /* ! if (v) { ! m_isVisible = true; ! UWidgetEvent * e = new UWidgetEvent(this, UEvent::WidgetShown); ! processWidgetEvent(e); ! } else { ! // widget about to hide ! UWidgetEvent * e = new UWidgetEvent(this, UEvent::WidgetHidden); ! processWidgetEvent(e); ! resetFocus(); ! m_isVisible = false; ! } ! invalidate(); ! repaint(); ! */ if (v && getParent() && !getParent()->isVisible()) { return; --- 188,192 ---- return; } ! if (v && getParent() && !getParent()->isVisible()) { return; *************** *** 213,216 **** --- 200,204 ---- return; } + // this implicitely shows/hides the window if (b != testState(WidgetVisible)) { if (b) { *************** *** 220,224 **** processWidgetEvent(e); } else if (!b) { ! // show self setState(WidgetVisible, false); UWidgetEvent * e = new UWidgetEvent(this, UEvent::WidgetHidden); --- 208,212 ---- processWidgetEvent(e); } else if (!b) { ! // hide self setState(WidgetVisible, false); UWidgetEvent * e = new UWidgetEvent(this, UEvent::WidgetHidden); *************** *** 749,762 **** bool ! UWidget::removeImpl(std::vector<UWidget*>::iterator iter) { ! if (iter != m_children.end()) { ! (*iter)->setChildrenVisible(false); ! (*iter)->removedFromHierarchy(); ! (*iter)->m_parent = NULL; // remove from mem manager ! releasePointer((*iter)); ! m_children.erase(iter); invalidateTree(); --- 737,752 ---- bool ! UWidget::removeImpl(int index) { ! if (m_children.size() > index ) { ! UWidget * ret = m_children[index]; ! ! ret->setChildrenVisible(false); ! ret->removedFromHierarchy(); ! ret->m_parent = NULL; // remove from mem manager ! releasePointer(ret); ! m_children.erase(m_children.begin() + index); invalidateTree(); *************** *** 771,783 **** m_children.end(), w); ! return removeImpl(iter); } bool UWidget::remove(unsigned int n) { ! if (m_children.size() > n ) { ! return removeImpl(m_children.begin() + n); ! } ! return false; } --- 761,770 ---- m_children.end(), w); ! return removeImpl(iter - m_children.begin()); } bool UWidget::remove(unsigned int n) { ! return removeImpl(n); } *************** *** 789,793 **** ret->reference(); } ! removeImpl(m_children.begin() + n); return ret; } --- 776,780 ---- ret->reference(); } ! removeImpl(n); return ret; } *************** *** 797,806 **** unsigned int UWidget::removeAll() { ! unsigned int size = m_children.size(); ! ! while (removeImpl(m_children.begin())) {} invalidate(); ! return size; } --- 784,795 ---- unsigned int UWidget::removeAll() { ! unsigned int count = 0; ! while (removeImpl(0)) { ! count++; ! } ! // count should be exactly the former widget count ... invalidate(); ! return count; } |
|
From: Johannes S. <sch...@us...> - 2005-10-17 16:39:31
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22786/include/ufo/widgets Modified Files: uwidget.hpp Log Message: Changed removeImpl(iterator) to removeImpl(int index). Made testState, setState(s), getState public. Index: uwidget.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/widgets/uwidget.hpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** uwidget.hpp 30 Sep 2005 12:37:00 -0000 1.30 --- uwidget.hpp 17 Oct 2005 16:39:22 -0000 1.31 *************** *** 875,879 **** */ virtual void addImpl(UWidget * w, UObject * constraints, int index); ! virtual bool removeImpl(std::vector<UWidget*>::iterator iter); /** Notifies recursively all childs that they have been added to --- 875,882 ---- */ virtual void addImpl(UWidget * w, UObject * constraints, int index); ! /** Removes the widget at the given index. ! * @return True if succesfull ! */ ! virtual bool removeImpl(int index); /** Notifies recursively all childs that they have been added to *************** *** 960,964 **** void detachStyleHints(); ! protected: // Protected methods bool testState(uint32_t state) const; void setState(uint32_t state, bool b = true); --- 963,967 ---- void detachStyleHints(); ! public: // Protected methods bool testState(uint32_t state) const; void setState(uint32_t state, bool b = true); |
|
From: Johannes S. <sch...@us...> - 2005-10-17 16:23:03
|
Update of /cvsroot/libufo/ufo-0.5/src/ux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19363/src/ux Modified Files: uxglxdriver.cpp Log Message: Fixed clean-up on destruction of glx driver. Index: uxglxdriver.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/ux/uxglxdriver.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** uxglxdriver.cpp 30 Sep 2005 12:37:36 -0000 1.9 --- uxglxdriver.cpp 17 Oct 2005 16:22:50 -0000 1.10 *************** *** 68,71 **** --- 68,75 ---- } + UXGLXDriver::~UXGLXDriver() { + quit(); + } + bool UXGLXDriver::init() { *************** *** 73,77 **** m_x11Display = XOpenDisplay(XDisplayName(NULL)); ! if (m_x11Display == NULL ) { uError() << "Couldn't open X11 display\n"; return false; --- 77,81 ---- m_x11Display = XOpenDisplay(XDisplayName(NULL)); ! if (m_x11Display == NULL) { uError() << "Couldn't open X11 display\n"; return false; *************** *** 130,138 **** void UXGLXDriver::quit() { ! XSync(m_x11Display, false); XCloseDisplay(m_x11Display); // delete opengl driver if (m_createdGLDriver) { delete (ugl_driver); } m_isInit = false; --- 134,152 ---- void UXGLXDriver::quit() { ! if (!m_isInit) { ! return; ! } ! XSync(m_x11Display, true); ! // hide all windows ! for (std::vector<UXGLXDevice*>::iterator iter = m_windowMap.begin(); ! iter != m_windowMap.end(); ++iter) { ! delete (*iter); ! } ! XCloseDisplay(m_x11Display); // delete opengl driver if (m_createdGLDriver) { delete (ugl_driver); + ugl_driver = NULL; } m_isInit = false; *************** *** 193,205 **** return NULL; } - /* - std::map<int, UXGLXDevice*>::const_iterator iter = m_windowMap.find(window); ! if (iter != m_windowMap.end() && ((*iter).second)) { ! std::cerr << (*iter).second << "\n" << ((*iter).second)->getFrame() << "\n"; ! return ((*iter).second)->getFrame()->getContext(); } ! return NULL; ! }*/ void --- 207,222 ---- return NULL; } ! void ! UXGLXDriver::destroyed(UXGLXDevice * device) { ! for (std::vector<UXGLXDevice*>::iterator iter = m_windowMap.begin(); ! iter != m_windowMap.end(); ++iter) { ! if ((*iter) == device) { ! m_windowMap.erase(iter); ! break; ! } } ! } ! void *************** *** 763,766 **** --- 780,788 ---- } + UXGLXDevice::~UXGLXDevice() { + hide(); + m_glxDriver->destroyed(this); + } + void UXGLXDevice::setSize(int w, int h) { *************** *** 938,941 **** --- 960,966 ---- void UXGLXDevice::hide() { + if (!m_isVisible) { + return; + } if (s_glx_shared_context == m_glContext) { s_glx_shared_context = NULL; |
|
From: Johannes S. <sch...@us...> - 2005-10-17 16:23:03
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo/ux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19363/include/ufo/ux Modified Files: uxglxdriver.hpp Log Message: Fixed clean-up on destruction of glx driver. Index: uxglxdriver.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/ux/uxglxdriver.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** uxglxdriver.hpp 21 May 2005 15:17:23 -0000 1.5 --- uxglxdriver.hpp 17 Oct 2005 16:22:50 -0000 1.6 *************** *** 55,58 **** --- 55,59 ---- public: UXGLXDriver(); + virtual ~UXGLXDriver(); public: // Implements UVideoDriver *************** *** 90,93 **** --- 91,99 ---- UMod::Modifier mapX11Modifiers(int modifiers); + protected: + friend class UXGLXDevice; + /** Removes device from device list. */ + void destroyed(UXGLXDevice * device); + public: // plugin methods static UPluginBase * createPlugin(); *************** *** 117,120 **** --- 123,127 ---- public: UXGLXDevice(UXGLXDriver * driver); + virtual ~UXGLXDevice(); public: // Implements UVideoDevice virtual void setSize(int w, int h); |
|
From: Johannes S. <sch...@us...> - 2005-10-17 15:36:44
|
Update of /cvsroot/libufo/ufo-0.5/src/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5722/src/util Modified Files: ucolor.cpp Log Message: Fixed alpha value for colors returned by brighter, darker. Index: ucolor.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/util/ucolor.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ucolor.cpp 13 Feb 2005 16:53:52 -0000 1.13 --- ucolor.cpp 17 Oct 2005 15:36:32 -0000 1.14 *************** *** 237,244 **** UColor UColor::darker() const { ! float temp[3]; temp[0] = m_farr[0] * FACTOR; temp[1] = m_farr[1] * FACTOR; temp[2] = m_farr[2] * FACTOR; // clamp --- 237,245 ---- UColor UColor::darker() const { ! float temp[4]; temp[0] = m_farr[0] * FACTOR; temp[1] = m_farr[1] * FACTOR; temp[2] = m_farr[2] * FACTOR; + temp[3] = m_farr[3]; // clamp *************** *** 248,252 **** } } ! return UColor(temp); } --- 249,253 ---- } } ! return UColor(temp, true); } *************** *** 255,265 **** // if is entirely black don't calculate other minima if (isBlack()) { ! return UColor(MIN_VAL, MIN_VAL, MIN_VAL); } else { // create temporary values, we do not want to modify this color ! float temp[3]; temp[0] = m_farr[0] / FACTOR; temp[1] = m_farr[1] / FACTOR; temp[2] = m_farr[2] / FACTOR; // clamp --- 256,267 ---- // if is entirely black don't calculate other minima if (isBlack()) { ! return UColor(MIN_VAL, MIN_VAL, MIN_VAL, getAlpha()); } else { // create temporary values, we do not want to modify this color ! float temp[4]; temp[0] = m_farr[0] / FACTOR; temp[1] = m_farr[1] / FACTOR; temp[2] = m_farr[2] / FACTOR; + temp[3] = m_farr[3]; // clamp *************** *** 268,272 **** temp[i] = std::min(temp[i], 1.0f); } ! return UColor(temp); } } --- 270,274 ---- temp[i] = std::min(temp[i], 1.0f); } ! return UColor(temp, true); } } |
|
From: Johannes S. <sch...@us...> - 2005-10-17 15:35:34
|
Update of /cvsroot/libufo/ufo-0.5/src/image In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5455/src/image Modified Files: uimageio.cpp Log Message: Updated to new UFileArchive API. Code clean-up. Index: uimageio.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/image/uimageio.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** uimageio.cpp 3 May 2005 11:09:36 -0000 1.13 --- uimageio.cpp 17 Oct 2005 15:35:22 -0000 1.14 *************** *** 75,79 **** , m_size() , m_components(0) ! //, m_filterRule(NoFilterRule) { } --- 75,79 ---- , m_size() , m_components(0) ! //, m_filterRule(NoFilterRule) { } *************** *** 84,88 **** , m_size() , m_components(0) ! //, m_filterRule(NoFilterRule) { load(fileNameA); --- 84,88 ---- , m_size() , m_components(0) ! //, m_filterRule(NoFilterRule) { load(fileNameA); *************** *** 94,98 **** , m_size() , m_components(0) ! //, m_filterRule(NoFilterRule) { load(streamA, extensionA); --- 94,98 ---- , m_size() , m_components(0) ! //, m_filterRule(NoFilterRule) { load(streamA, extensionA); *************** *** 108,113 **** m_data = new unsigned char[widthA * heightA * componentsA]; // ! //FIXME ! ! //use memcpy or similar for (int i = 0; i < widthA * heightA * componentsA; ++i) { m_data[i] = dataA[i]; --- 108,112 ---- m_data = new unsigned char[widthA * heightA * componentsA]; // ! //FIXME use memcpy or similar for (int i = 0; i < widthA * heightA * componentsA; ++i) { m_data[i] = dataA[i]; *************** *** 158,167 **** m_comment = fileNameA; ! std::ifstream * fileStream = UFileArchive::getDefault()->createFileStream( ! fileNameA, ! std::ios_base::in | std::ios_base::binary ! ); ! ! if (!*fileStream) { // NULL pointers should happen uError() << "UImageIO: file " << fileNameA --- 157,163 ---- m_comment = fileNameA; ! std::string absolutPath = UFileArchive::getDefault()->getAbsolutePath(fileNameA); ! ! if (absolutPath.empty()) { // NULL pointers should happen uError() << "UImageIO: file " << fileNameA *************** *** 169,180 **** return false; } ! ! bool valid = load(*fileStream, getFileExtension(fileNameA)); if (!valid) { ! uError() << "UImageIO: Failed to load image " << fileNameA << "\n"; } - // dispose data - UFileArchive::getDefault()->destroyFileStream(fileStream); return valid; --- 165,176 ---- return false; } ! ! std::ifstream fileStream(absolutPath.c_str(), std::ios_base::in | std::ios_base::binary); ! ! bool valid = load(fileStream, getFileExtension(fileNameA)); if (!valid) { ! uError() << "UImageIO: Failed to load image " << absolutPath << "\n"; } return valid; |
|
From: Johannes S. <sch...@us...> - 2005-10-17 15:35:02
|
Update of /cvsroot/libufo/ufo-0.5/src/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5300/src/util Modified Files: ufilearchive.cpp Log Message: Added isDirectory, dirName. Removed createFileStream, destroyFileStream. Index: ufilearchive.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/util/ufilearchive.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ufilearchive.cpp 13 Feb 2005 18:00:13 -0000 1.9 --- ufilearchive.cpp 17 Oct 2005 15:34:48 -0000 1.10 *************** *** 38,41 **** --- 38,42 ---- #include <cstring> #include <dirent.h> + #include <sys/stat.h> #endif *************** *** 60,64 **** } ! // this code is shamelessly stolen from the LGPL'ed PhysicsFS // by Ryan C. Gordon -- http://icculus.org/physfs/ std::vector<std::string> --- 61,65 ---- } ! // this code is inspired PhysicsFS // by Ryan C. Gordon -- http://icculus.org/physfs/ std::vector<std::string> *************** *** 79,100 **** break; } ! if (strcmp(ent->d_name, ".") == 0) { continue; } ! if (strcmp(ent->d_name, "..") == 0) { continue; } ! /* FIXME ! ! following sym links might compromise the system security ! if (omitSymLinks) { ! char *p; ! int len = strlen(ent->d_name) + dlen + 1; ! if (len > bufsize) { ! p = realloc(buf, len); ! if (p == NULL) { continue; } ! buf = p; ! bufsize = len; ! } // if ! ! strcpy(buf + dlen, ent->d_name); ! if (__PHYSFS_platformIsSymLink(buf)) { continue; } ! } // if ! */ ret.push_back(ent->d_name); } // while --- 80,89 ---- break; } ! if (strcmp(ent->d_name, ".") == 0 || ! strcmp(ent->d_name, "..") == 0) { ! // omit . and .. ! continue; ! } ! // FIXME: should we omit sym links? ret.push_back(ent->d_name); } // while *************** *** 120,126 **** do { ! if (strcmp(ent.cFileName, ".") == 0) { continue; } ! if (strcmp(ent.cFileName, "..") == 0) { continue; } ! ret.push_back(ent.cFileName); --- 109,117 ---- do { ! if (strcmp(ent.cFileName, ".") == 0 || ! strcmp(ent.cFileName, "..") == 0) { ! // omit . and .. ! continue; ! } ret.push_back(ent.cFileName); *************** *** 132,135 **** --- 123,160 ---- } + std::string + UFileArchive::dirName(const std::string & path) { + std::string::size_type pos = path.size(); + // eliminate trailing slashes + if (path[path.size() - 1] == '/') { + pos = path.find_last_not_of('/'); + } + // search directory slash + pos = path.find_last_of('/', pos); + // eliminate all slashes + pos = path.find_last_not_of('/', pos); + + if (pos == std::string::npos) { + return "/"; + } + return path.substr(0, pos + 1); + } + + bool + UFileArchive::isDirectory(const std::string & path) { + #if defined(UFO_OS_UNIX) + struct stat statbuf; + if (stat(path, &statbuf) == -1) { + // FIXME: process strerror(errno)? + return false; + } + return S_ISDIR(statbuf.st_mode); + #elif defined(UFO_OS_WIN32) // !UFO_OS_UNIX + return ((GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY) != 0); + #else + return false; + #endif + } + // // c'tors *************** *** 205,215 **** bool UFileArchive::existsInArchive(const std::string & fileName) { ! std::ifstream * stream = createFileStream(fileName); ! if (*stream) { ! stream->close(); ! delete(stream); ! return true; ! } ! return false; } --- 230,234 ---- bool UFileArchive::existsInArchive(const std::string & fileName) { ! return (getAbsolutePath(fileName) != ""); } *************** *** 228,264 **** } - std::ifstream * - UFileArchive::createFileStream(const std::string & fileNameA, - std::ios_base::openmode modeA) { - std::ifstream * file = NULL; - for (std::vector<std::string>::const_iterator iter = m_archives.begin(); - iter != m_archives.end(); ++iter) { - std::string newFileName(*iter); - newFileName += '/'; - newFileName.append(fileNameA); - - file = new std::ifstream(newFileName.c_str(), modeA); - - if (file) { - if (*file) { // valid file stream - return file; - } else { // free memory - delete (file); - } - } - } - file = new std::ifstream(fileNameA.c_str(), modeA); - // This may be invalid - return file; - } - - void - UFileArchive::destroyFileStream(std::ifstream * fstream) { - if (fstream) { - fstream->close(); - delete (fstream); - } - } - // FIXME // we can't create this instance at the very beginning of the run time --- 247,250 ---- |
|
From: Johannes S. <sch...@us...> - 2005-10-17 15:35:01
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5300/include/ufo/util Modified Files: ufilearchive.hpp Log Message: Added isDirectory, dirName. Removed createFileStream, destroyFileStream. Index: ufilearchive.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/ufilearchive.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ufilearchive.hpp 21 May 2005 15:17:23 -0000 1.9 --- ufilearchive.hpp 17 Oct 2005 15:34:49 -0000 1.10 *************** *** 50,61 **** public: // Public static methods /** Checks if a file exists ! * @param fileNameA file to check * @return true if the file exists */ static bool exists(const std::string & fileName); /** Reads the contents of the given directory. ! * Returns an empty vector when the given directory is a file. */ ! static std::vector<std::string> readDir(const std::string & dirName); static UFileArchive * getDefault(); --- 50,75 ---- public: // Public static methods /** Checks if a file exists ! * @param fileName file to check * @return true if the file exists */ static bool exists(const std::string & fileName); /** Reads the contents of the given directory. ! * @return A vector with all files found in the given directory */ ! static std::vector<std::string> readDir(const std::string & path); ! ! /** Determins the directory component of a given path. ! * Example: ! * @code ! * dirNname ("/usr/local/foobar"); --> Returns: "/usr/local" ! * @endcode ! * @return The directory name ! */ ! static std::string dirName(const std::string & path); ! ! /** Determines if the given path is really a directory. ! * @return True if path is a directory, otherwise false. ! */ ! static bool isDirectory(const std::string & path); static UFileArchive * getDefault(); *************** *** 69,75 **** public: // Public methods - /** adds some generic search directories */ - //static void init(); - /** adds a further directory to the search path. */ void addArchive(const std::string & arc); --- 83,86 ---- *************** *** 79,83 **** void removeAllArchives(); ! /** Adds a colon separated list to the search path. */ void addSearchPath(const std::string & searchPath); /** Returns a colon separated list of the search path. --- 90,94 ---- void removeAllArchives(); ! /** Adds a colon (i.e. ':') separated list to the search path. */ void addSearchPath(const std::string & searchPath); /** Returns a colon separated list of the search path. *************** *** 91,122 **** std::vector<std::string> getSearchPathAsVector() const; ! /** Checks if a file exists in the archive ! * @param fileNameA file to check * @return true if the file exists */ ! bool existsInArchive(const std::string & fileNameA); ! ! /** Returns the full path name of the given file name ! * if found in the archive. ! * Otherwise returns an empty string. ! */ ! std::string getAbsolutePath(const std::string & fileNameA) const; ! ! /** Creates a file stream by teh given attributes. ! * This is done by iterating through the search path. ! * This method does not return NULL, but may return an ! * file stream which fails on operations ! * (i.e. ifstream::fail returns true). ! * ! * Please note: The created file stream has to be closed and deleted ! * by destroyFileStream! ! * @see destroyFileStream ! */ ! std::ifstream * createFileStream(const std::string & fileNameA, ! std::ios_base::openmode modeA = std::ios_base::in); ! /** Closes and destroys a file stream object created by createFileStream. */ ! void destroyFileStream(std::ifstream * fstream); private: // Private static methods --- 102,116 ---- std::vector<std::string> getSearchPathAsVector() const; ! /** Checks if a file with the given file name exists in the search path ! * @param fileName file to check * @return true if the file exists */ ! bool existsInArchive(const std::string & fileName); ! /** @param fileName file to search for ! * @return The full path name of the given file name ! * if found in the search path, otherwise an empty string. */ ! std::string getAbsolutePath(const std::string & fileName) const; private: // Private static methods |
|
From: Johannes S. <sch...@us...> - 2005-10-12 12:02:29
|
Update of /cvsroot/libufo/ufo-0.5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20655 Modified Files: configure.ac README Log Message: Bumped version info to 0.8.4. Index: README =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/README,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README 11 Oct 2005 14:22:45 -0000 1.9 --- README 12 Oct 2005 12:02:18 -0000 1.10 *************** *** 5,9 **** (UFO) ! Version 0.8.3 --- --- 5,9 ---- (UFO) ! Version 0.8.4 --- Index: configure.ac =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/configure.ac,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** configure.ac 11 Oct 2005 14:22:45 -0000 1.34 --- configure.ac 12 Oct 2005 12:02:18 -0000 1.35 *************** *** 21,25 **** UFO_MAJOR_VERSION=0 UFO_MINOR_VERSION=8 ! UFO_MICRO_VERSION=3 UFO_INTERFACE_AGE=0 UFO_BINARY_AGE=0 --- 21,25 ---- UFO_MAJOR_VERSION=0 UFO_MINOR_VERSION=8 ! UFO_MICRO_VERSION=4 UFO_INTERFACE_AGE=0 UFO_BINARY_AGE=0 |
|
From: Johannes S. <sch...@us...> - 2005-10-12 12:02:29
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20655/include/ufo Modified Files: uversioninfo.hpp Log Message: Bumped version info to 0.8.4. Index: uversioninfo.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/uversioninfo.hpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** uversioninfo.hpp 11 Oct 2005 14:22:46 -0000 1.12 --- uversioninfo.hpp 12 Oct 2005 12:02:18 -0000 1.13 *************** *** 38,42 **** #define UFO_MAJOR_VERSION 0 #define UFO_MINOR_VERSION 8 ! #define UFO_MICRO_VERSION 3 namespace ufo { --- 38,42 ---- #define UFO_MAJOR_VERSION 0 #define UFO_MINOR_VERSION 8 ! #define UFO_MICRO_VERSION 4 namespace ufo { |
|
From: Johannes S. <sch...@us...> - 2005-10-11 20:23:46
|
Update of /cvsroot/libufo/ufo-0.5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5087 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/ChangeLog,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ChangeLog 30 Sep 2005 12:42:20 -0000 1.36 --- ChangeLog 11 Oct 2005 20:23:30 -0000 1.37 *************** *** 893,894 **** --- 893,902 ---- (might break DevCpp?) - Fixed several warnings + + 0.8.3 + - Fixed UStyleHints::transcribe + - Some style changes to radio button indicators and sliders. + - Added UGraphics::{set,get}LineWidth + - Replaced internal calls to setOpacity with CSS class ids. + - Changed GL graphics to have an 0.5f offset for lines rasterization + (removed general 3/8 pixel offset). |
|
From: Johannes S. <sch...@us...> - 2005-10-11 20:23:28
|
Update of /cvsroot/libufo/ufo-0.5/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5036/test Modified Files: gui.css gui.xul Log Message: Index: gui.css =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/test/gui.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gui.css 3 Sep 2005 10:07:52 -0000 1.3 --- gui.css 11 Oct 2005 20:23:14 -0000 1.4 *************** *** 18,21 **** --- 18,28 ---- list-style-image: url('smilie.tga'); } + popupmenu { + background-color: #D0D3E4; + opacity: 0.8; + } + listbox { + opacity: 0.8; + } /* CSS class ids */ *************** *** 43,48 **** } .transparent { - /** This is UFO specific and sets the background opacity */ opacity: 0; } --- 50,57 ---- } + /** The opacity property UFO specific and sets the background opacity */ + /* .transparent { opacity: 0; } + */ Index: gui.xul =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/test/gui.xul,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gui.xul 3 Sep 2005 10:07:52 -0000 1.3 --- gui.xul 11 Oct 2005 20:23:14 -0000 1.4 *************** *** 6,10 **** <window id="findfile-window" ! title="Testing Xul frames (see gui.xul)" orient="vertical" pack="start" --- 6,10 ---- <window id="findfile-window" ! title="Testing Xul frames (see gui.xul and gui.css)" orient="vertical" pack="start" |
|
From: Johannes S. <sch...@us...> - 2005-10-11 20:23:10
|
Update of /cvsroot/libufo/ufo-0.5/src/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4937/src/ui Modified Files: ubasicstyle.cpp Log Message: Changed radio button indicator, check box indicator and the slider knob. Index: ubasicstyle.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/ui/ubasicstyle.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ubasicstyle.cpp 30 Sep 2005 12:37:20 -0000 1.7 --- ubasicstyle.cpp 11 Oct 2005 20:22:56 -0000 1.8 *************** *** 28,33 **** #include "ufo/ui/ubasicstyle.hpp" - //#include "ufo/gl/ugl_driver.hpp" - #include "ufo/ui/ustyle.hpp" #include "ufo/ui/ustylehints.hpp" --- 28,31 ---- *************** *** 170,174 **** case PE_IndicatorCheckBox: - case PE_IndicatorRadioButton: if (widgetState & WidgetDisabled) { g->setColor(UColor::gray); --- 168,171 ---- *************** *** 180,183 **** --- 177,197 ---- g->fillRect(rect - UInsets(1, 1, 1, 1)); break; + case PE_IndicatorRadioButton: { + UVertexArray array; + array.add(rect.x + 4, rect.y + 0); + array.add(rect.x + 0, rect.y + 4); + array.add(rect.x + 0, rect.y + 6); + array.add(rect.x + 4, rect.y + 10); + array.add(rect.x + 6, rect.y + 10); + array.add(rect.x + 10, rect.y + 6); + array.add(rect.x + 10, rect.y + 4); + array.add(rect.x + 6, rect.y + 0); + array.add(rect.x + 4, rect.y + 0); + g->setColor(UColor::white); + g->drawVertexArray(UGraphics::TriangleFan, &array); + g->setColor(UColor::gray); + g->drawVertexArray(UGraphics::LineStrip, &array); + } + break; case PE_IndicatorCheckBoxMask: if (widgetState & WidgetDisabled) { *************** *** 187,192 **** } if (widgetState & WidgetSelected) { g->drawLine(rect.x + 2, rect.y + 2, rect.x + rect.w - 3, rect.y + rect.h - 3); ! g->drawLine(rect.x + rect.w - 4, rect.y + 2, rect.x + 1, rect.y + rect.h - 3); } break; --- 201,208 ---- } if (widgetState & WidgetSelected) { + g->setLineWidth(2); g->drawLine(rect.x + 2, rect.y + 2, rect.x + rect.w - 3, rect.y + rect.h - 3); ! g->drawLine(rect.x + rect.w - 4, rect.y + 3, rect.x + 1, rect.y + rect.h - 2); ! g->setLineWidth(1); } break; *************** *** 209,212 **** --- 225,229 ---- array.add(rect.x + 4, rect.y + 2); g->drawVertexArray(UGraphics::LineStrip, &array); + g->drawVertexArray(UGraphics::TriangleFan, &array); } break; *************** *** 614,617 **** --- 631,641 ---- return ret + UInsets(0, 0, 0, 16); break; + case CE_Slider: + if (hints->orientation == Vertical) { + return ret + UInsets(0, 0, 0, 12); + } else { + return ret + UInsets(12, 0, 0, 0); + } + break; case CE_MenuItem: { const UMenuItemModel * item = static_cast<const UMenuItemModel*>(model); *************** *** 710,714 **** case CE_MenuItem: { const UMenuItemModel * menuItem = static_cast<const UMenuItemModel*>(model); ! //paintPrimitive(g, PE_WidgetBackground, model, w); if (menuItem->widgetState & WidgetHasMouseFocus || menuItem->widgetState & WidgetHighlighted) { --- 734,738 ---- case CE_MenuItem: { const UMenuItemModel * menuItem = static_cast<const UMenuItemModel*>(model); ! //paintPrimitive(g, PE_PanelWidget, rect, hints, model->widgetState); if (menuItem->widgetState & WidgetHasMouseFocus || menuItem->widgetState & WidgetHighlighted) { *************** *** 947,956 **** paintPrimitive(g, PE_PanelWidget, rect, hints, model->widgetState); ! // slider knob if (sliderModel->subControls & SC_SliderGroove) { UPoint left(5, rect.h / 2); UPoint right(rect.w - 5, left.y); g->setColor(hints->palette.dark()); g->drawLine(left, right); } --- 971,985 ---- paintPrimitive(g, PE_PanelWidget, rect, hints, model->widgetState); ! // slider groove if (sliderModel->subControls & SC_SliderGroove) { + /* UPoint left(5, rect.h / 2); UPoint right(rect.w - 5, left.y); g->setColor(hints->palette.dark()); g->drawLine(left, right); + */ + int mid_y = rect.h / 2; + g->setColor(hints->palette.background().darker()); + g->drawRect(URectangle(0, mid_y - 2, rect.w, 4)); } *************** *** 960,963 **** --- 989,993 ---- hints, model, SC_SliderHandle) ); + /* if (sliderModel->activeSubControls & SC_SliderHandle) { g->setColor(hints->palette.highlight().brighter()); *************** *** 968,971 **** --- 998,1026 ---- g->setColor(hints->palette.highlight().darker()); g->drawRect(slider_rect); + */ + //g->setEnabled(UGraphics::LineAntialiasing, true); + float arr_height = slider_rect.h * 0.7; + float arr_height_2 = slider_rect.h * 0.9; + g->setColor(hints->palette.background().darker()); + UVertexArray array; + array.add(slider_rect.x + 1, slider_rect.y); + array.add(slider_rect.x - 1 + slider_rect.w, slider_rect.y); + array.add(slider_rect.x + slider_rect.w, slider_rect.y + 1); + array.add(slider_rect.x + slider_rect.w, slider_rect.y + arr_height); + + array.add(slider_rect.x + slider_rect.w * 0.75f, slider_rect.y + arr_height_2); + array.add(slider_rect.x + slider_rect.w / 2, slider_rect.y + slider_rect.h); + array.add(slider_rect.x + slider_rect.w * 0.25f, slider_rect.y + arr_height_2); + + array.add(slider_rect.x, slider_rect.y + arr_height); + array.add(slider_rect.x, slider_rect.y + 1); + array.add(slider_rect.x + 1, slider_rect.y); + g->setColor(hints->palette.background()); + g->drawVertexArray(UGraphics::TriangleFan, &array); + g->setColor(hints->palette.dark()); + g->drawVertexArray(UGraphics::LineStrip, &array); + + g->drawRect(slider_rect.x + 2, slider_rect.y + 3, 2, 2); + g->drawRect(slider_rect.x + slider_rect.w - 3, slider_rect.y + 3, 2, 2); } } *************** *** 1291,1295 **** case CE_Slider: { const USliderModel * sliderModel = static_cast<const USliderModel*>(model); ! int width = 10; int maxlen = (hints->orientation == Vertical) ? rect.h : rect.w; int pos = basicstyle_sliderModelToView( --- 1346,1351 ---- case CE_Slider: { const USliderModel * sliderModel = static_cast<const USliderModel*>(model); ! int width = 8; ! int height = 12; int maxlen = (hints->orientation == Vertical) ? rect.h : rect.w; int pos = basicstyle_sliderModelToView( *************** *** 1301,1309 **** case SC_SliderHandle: { if (hints->orientation == Vertical) { ! ret.setBounds(rect.x + rect.w / 2 - width / 2, pos, ! width, width); } else { ! ret.setBounds(pos, rect.y + rect.h / 2 - width / 2, ! width, width); } } --- 1357,1365 ---- case SC_SliderHandle: { if (hints->orientation == Vertical) { ! ret.setBounds(rect.x + rect.w / 2 - height / 2, pos, ! height, width); } else { ! ret.setBounds(pos, rect.y + rect.h / 2 - height / 2, ! width, height); } } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 20:22:18
|
Update of /cvsroot/libufo/ufo-0.5/src/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4727/src/gl Modified Files: ugl_graphics.cpp Log Message: Added {set,get}LineWidth. Changed GL graphics to have an 0.5f offset for lines rasterization (removed general 3/8 pixel offset). Index: ugl_graphics.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/gl/ugl_graphics.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ugl_graphics.cpp 15 Sep 2005 16:34:44 -0000 1.14 --- ugl_graphics.cpp 11 Oct 2005 20:22:06 -0000 1.15 *************** *** 125,129 **** 100 ); ! ugl_driver->glTranslatef(0.375, 0.375, 0); ugl_driver->glMatrixMode(GL_MODELVIEW); --- 125,129 ---- 100 ); ! //ugl_driver->glTranslatef(0.375, 0.375, 0); ugl_driver->glMatrixMode(GL_MODELVIEW); *************** *** 211,220 **** void ! UGL_Graphics::setEnabled(GCState state, bool b) { } bool UGL_Graphics::isEnabled(GCState state) const { ! return false; } --- 211,250 ---- void ! UGL_Graphics::setEnabled(GCState state, bool b) {/* ! static bool has_blend_enabled = false; ! if (state == LineAntialiasing) { ! if (b) { ! ugl_driver->glEnable(GL_LINE_SMOOTH); ! setEnabled(Blending, true); ! } else { ! ugl_driver->glDisable(GL_LINE_SMOOTH); ! if (has_blend_enabled) { ! setEnabled(Blending, false); ! } ! } ! } else if (state == Blending) { ! if (b) { ! if (!has_blend_enabled && !isEnabled(Blending)) { ! has_blend_enabled = true; ! } ! ugl_driver->glEnable(GL_BLEND); ! ugl_driver->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ! } else { ! ugl_driver->glEnable(GL_LINE_SMOOTH); ! has_blend_enabled = false; ! } ! }*/ } bool UGL_Graphics::isEnabled(GCState state) const { ! GLboolean ret[1]; ! ret[0] = 0; ! if (state == LineAntialiasing) { ! ugl_driver->glGetBooleanv(GL_LINE_SMOOTH, ret); ! } else if (state == Blending) { ! ugl_driver->glGetBooleanv(GL_BLEND, ret); ! } ! return ret[0]; } *************** *** 364,367 **** --- 394,409 ---- void + UGL_Graphics::setLineWidth(float width) { + ugl_driver->glLineWidth(width); + } + + float + UGL_Graphics::getLineWidth() const { + float ret[1]; + ugl_driver->glGetFloatv(GL_LINE_WIDTH, ret); + return ret[0]; + } + + void UGL_Graphics::drawString(const std::string & text, int x, int y) { m_font.getRenderer()->drawString(this, text.data(), text.length(), x, y); *************** *** 398,406 **** // basic drawing operations // ! void UGL_Graphics::drawRect(const URectangle & rect) { // -1 is correct, as lines are drawn like rectangles with // width 1 measured in y direction ugl_driver->glBegin(GL_LINE_LOOP); ugl_driver->glVertex2i(rect.x, rect.y); --- 440,449 ---- // basic drawing operations // ! static float add_width = 0.5f; void UGL_Graphics::drawRect(const URectangle & rect) { // -1 is correct, as lines are drawn like rectangles with // width 1 measured in y direction + ugl_driver->glTranslatef(add_width, add_width, 0); ugl_driver->glBegin(GL_LINE_LOOP); ugl_driver->glVertex2i(rect.x, rect.y); *************** *** 409,412 **** --- 452,456 ---- ugl_driver->glVertex2i(rect.x + rect.w - 1, rect.y); ugl_driver->glEnd(); + ugl_driver->glTranslatef(-add_width, -add_width, 0); } *************** *** 418,425 **** --- 462,471 ---- void UGL_Graphics::drawLine(const UPoint & p1, const UPoint & p2) { + ugl_driver->glTranslatef(add_width, add_width, 0); ugl_driver->glBegin(GL_LINES); ugl_driver->glVertex2i(p1.x, p1.y); ugl_driver->glVertex2i(p2.x, p2.y); ugl_driver->glEnd(); + ugl_driver->glTranslatef(-add_width, -add_width, 0); } void *************** *** 429,435 **** --- 475,483 ---- case Lines: glType = GL_LINES; + ugl_driver->glTranslatef(add_width, add_width, 0); break; case LineStrip: glType = GL_LINE_STRIP; + ugl_driver->glTranslatef(add_width, add_width, 0); break; case Triangles: *************** *** 439,442 **** --- 487,493 ---- glType = GL_TRIANGLE_STRIP; break; + case TriangleFan: + glType = GL_TRIANGLE_FAN; + break; default: glType = GL_LINE_STRIP; *************** *** 450,453 **** --- 501,514 ---- ugl_driver->glDrawArrays(glType, 0, buffer->getCount()); } + switch (type) { + case Lines: + glType = GL_LINES; + ugl_driver->glTranslatef(-add_width, -add_width, 0); + break; + case LineStrip: + glType = GL_LINE_STRIP; + ugl_driver->glTranslatef(-add_width, -add_width, 0); + break; + } } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 20:21:22
|
Update of /cvsroot/libufo/ufo-0.5/src/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4379/src/ui Modified Files: ustylehints.cpp Log Message: Fixed UStyleHints::transcribe (border property). Index: ustylehints.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/ui/ustylehints.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ustylehints.cpp 16 Jul 2005 13:47:27 -0000 1.2 --- ustylehints.cpp 11 Oct 2005 20:21:10 -0000 1.3 *************** *** 80,97 **** preferredSize.transcribe(hints->preferredSize); // FIXME: ! if (hints->border->borderType == NoBorder) { border->borderType = hints->border->borderType; } for (int i = 0; i < 4; ++i) { ! if (hints->border->color[i] == UColor()) { border->color[i] = hints->border->color[i]; } ! if (hints->border->style[i] == NoBorderStyle) { border->style[i] = hints->border->style[i]; } ! if (hints->border->width[i] == 0) { border->width[i] = hints->border->width[i]; } ! if (hints->border->radius[i] == 0) { border->radius[i] = hints->border->radius[i]; } --- 80,97 ---- preferredSize.transcribe(hints->preferredSize); // FIXME: ! if (hints->border->borderType != NoBorder) { border->borderType = hints->border->borderType; } for (int i = 0; i < 4; ++i) { ! if (hints->border->color[i] != UColor()) { border->color[i] = hints->border->color[i]; } ! if (hints->border->style[i] != NoBorderStyle) { border->style[i] = hints->border->style[i]; } ! if (hints->border->width[i] != 0) { border->width[i] = hints->border->width[i]; } ! if (hints->border->radius[i] != 0) { border->radius[i] = hints->border->radius[i]; } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:28:22
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23766/src/widgets Modified Files: ucombobox.cpp Log Message: Added line border to combo box popup. Index: ucombobox.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/ucombobox.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ucombobox.cpp 30 Sep 2005 12:37:20 -0000 1.10 --- ucombobox.cpp 11 Oct 2005 19:28:01 -0000 1.11 *************** *** 204,207 **** --- 204,208 ---- if (s_pane == NULL) { s_pane = new UScrollPane(); + s_pane->setBorder(LineBorder); s_pane->reference(); } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:27:13
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23508/src/widgets Modified Files: uitem.cpp Log Message: Only deselected items respect opacity. Index: uitem.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uitem.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** uitem.cpp 12 Jul 2005 13:32:55 -0000 1.13 --- uitem.cpp 11 Oct 2005 19:27:05 -0000 1.14 *************** *** 77,83 **** } else { bg = hints->palette.base(); ! } ! if (hints->opacity != 1.0f) { ! bg.getFloat()[3] = hints->opacity; } g->setColor(bg); --- 77,83 ---- } else { bg = hints->palette.base(); ! if (hints->opacity != 1.0f) { ! bg.getFloat()[3] = hints->opacity; ! } } g->setColor(bg); |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:26:27
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23346/src/widgets Modified Files: upopupmenu.cpp Log Message: Set the gap between widgets to 0. Index: upopupmenu.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/upopupmenu.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** upopupmenu.cpp 21 Jun 2005 09:28:34 -0000 1.17 --- upopupmenu.cpp 11 Oct 2005 19:26:17 -0000 1.18 *************** *** 58,62 **** , m_closeSlot(slot(*this, &UPopupMenu::popupCloseSlot)) { ! setLayout(new UBoxLayout(Vertical)); setCssType("popupmenu"); } --- 58,62 ---- , m_closeSlot(slot(*this, &UPopupMenu::popupCloseSlot)) { ! setLayout(new UBoxLayout(Vertical, 0, 0)); setCssType("popupmenu"); } *************** *** 67,71 **** , m_closeSlot(slot(*this, &UPopupMenu::popupCloseSlot)) { ! setLayout(new UBoxLayout(Vertical)); setCssType("popupmenu"); } --- 67,71 ---- , m_closeSlot(slot(*this, &UPopupMenu::popupCloseSlot)) { ! setLayout(new UBoxLayout(Vertical, 0, 0)); setCssType("popupmenu"); } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:25:55
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23165/src/widgets Modified Files: uslider.cpp Log Message: Fixed sizing (using style class now). Index: uslider.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uslider.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** uslider.cpp 30 Sep 2005 12:37:20 -0000 1.6 --- uslider.cpp 11 Oct 2005 19:25:43 -0000 1.7 *************** *** 100,106 **** USlider::getContentsSize(const UDimension & maxSize) const { if (getStyleHints()->orientation == Vertical) { ! return UDimension(10, 100); } else { ! return UDimension(100, 10); } } --- 100,106 ---- USlider::getContentsSize(const UDimension & maxSize) const { if (getStyleHints()->orientation == Vertical) { ! return UDimension(0, 100); } else { ! return UDimension(100, 0); } } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:24:37
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22748/src/widgets Modified Files: uscrollpane.cpp Log Message: Fixed setting of correct style hints (by removing setBorder). Replaced setOpaque with setClassId. Index: uscrollpane.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uscrollpane.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** uscrollpane.cpp 30 Sep 2005 12:37:20 -0000 1.18 --- uscrollpane.cpp 11 Oct 2005 19:24:29 -0000 1.19 *************** *** 63,74 **** setEventState(UEvent::MouseWheel, true); // FIXME ! // to UI class? //setBorder(UBorderFactory::createBevelBorder(Lowered)); ! setBorder(LoweredBevelBorder);//UBorderFactory::createBevelBorder(Lowered)); //setBorder(UBorderFactory::createLineBorder(UColor::red)); - - // FIXME: should this be set via style sheets? - setOpaque(false); } --- 63,74 ---- setEventState(UEvent::MouseWheel, true); + // FIXME: should this be set via style sheets? + setCssClass("transparent"); + // FIXME ! // to UI class? //setBorder(UBorderFactory::createBevelBorder(Lowered)); ! //setBorder(LoweredBevelBorder);//UBorderFactory::createBevelBorder(Lowered)); //setBorder(UBorderFactory::createLineBorder(UColor::red)); } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:23:04
|
Update of /cvsroot/libufo/ufo-0.5/src/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22108/src/ui Modified Files: ustylemanager.cpp Log Message: Replaced calls to setOpaque,setOpacity with CSS class ids (transparent). Index: ustylemanager.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/ui/ustylemanager.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ustylemanager.cpp 15 Sep 2005 10:27:14 -0000 1.4 --- ustylemanager.cpp 11 Oct 2005 19:22:20 -0000 1.5 *************** *** 127,130 **** --- 127,134 ---- m_hints["textedit"] = textedit; m_hints["listbox"] = textedit->clone(); + + UStyleHints * transparent = new UStyleHints(); + transparent->opacity = 0.0f; + m_hints[".transparent"] = transparent; } |
|
From: Johannes S. <sch...@us...> - 2005-10-11 19:22:33
|
Update of /cvsroot/libufo/ufo-0.5/src/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22108/src/widgets Modified Files: udesktoppane.cpp uinternalframe.cpp urootpane.cpp uviewport.cpp Log Message: Replaced calls to setOpaque,setOpacity with CSS class ids (transparent). Index: uinternalframe.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uinternalframe.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** uinternalframe.cpp 30 Sep 2005 12:37:20 -0000 1.18 --- uinternalframe.cpp 11 Oct 2005 19:22:21 -0000 1.19 *************** *** 96,100 **** { setCssType("internalframe"); ! setOpaque(false); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); --- 96,100 ---- { setCssType("internalframe"); ! setCssClass("transparent"); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); *************** *** 110,114 **** { setCssType("internalframe"); ! setOpaque(false); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); --- 110,114 ---- { setCssType("internalframe"); ! setCssClass("transparent"); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); *************** *** 123,127 **** { setCssType("internalframe"); ! setOpaque(false); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); --- 123,127 ---- { setCssType("internalframe"); ! setCssClass("transparent"); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); *************** *** 136,140 **** { setCssType("internalframe"); ! setOpaque(false); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); --- 136,140 ---- { setCssType("internalframe"); ! setCssClass("transparent"); setLayout(new UBorderLayout(0, 0)); add(new _TitleBar(this), UBorderLayout::North); Index: urootpane.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/urootpane.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** urootpane.cpp 30 Sep 2005 12:37:20 -0000 1.15 --- urootpane.cpp 11 Oct 2005 19:22:21 -0000 1.16 *************** *** 98,102 **** URootPane::createContentPane() const { UWidget * contentPane = new UWidget(); ! contentPane->setOpaque(false); return contentPane; } --- 98,102 ---- URootPane::createContentPane() const { UWidget * contentPane = new UWidget(); ! contentPane->setCssClass("transparent"); return contentPane; } Index: udesktoppane.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/udesktoppane.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** udesktoppane.cpp 30 Sep 2005 12:37:20 -0000 1.4 --- udesktoppane.cpp 11 Oct 2005 19:22:21 -0000 1.5 *************** *** 59,66 **** , m_rightDock(new UWidget()) { ! m_topDock->setOpaque(false); ! m_leftDock->setOpaque(false); ! m_bottomDock->setOpaque(false); ! m_rightDock->setOpaque(false); m_topDock->setLayout(new UBoxLayout(Vertical, 0, 0)); --- 59,66 ---- , m_rightDock(new UWidget()) { ! m_topDock->setCssClass("transparent"); ! m_leftDock->setCssClass("transparent"); ! m_bottomDock->setCssClass("transparent"); ! m_rightDock->setCssClass("transparent"); m_topDock->setLayout(new UBoxLayout(Vertical, 0, 0)); Index: uviewport.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/widgets/uviewport.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** uviewport.cpp 30 Sep 2005 12:37:20 -0000 1.11 --- uviewport.cpp 11 Oct 2005 19:22:21 -0000 1.12 *************** *** 92,96 **** setClipping(true); // FIXME: should this be set via style sheets? ! setOpaque(false); } --- 92,96 ---- setClipping(true); // FIXME: should this be set via style sheets? ! setCssClass("transparent"); } |