summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.h
AgeCommit message (Collapse)AuthorFilesLines
2025-04-25GUI: Added support for multiple color palettes to ThemeThorbjørn Lindeijer1-3/+3
Each Skin can point to a different palette, which can be used to tweak text colors where necessary. For now there is no generic solution for this, instead a number of locations have been adjusted to take the palette into account: * ChatWindow sets its palette on the BrowserBox used in its tabs. * Popup sets its palette on child widgets when they are added (covering BrowserBox, Label and TextBox). * ItemPopup now uses its palette when looking up colors. The BrowserBox now retrieves its numbered text colors from the theme. Also added OLDCHAT, AWAYCHAT and GLOBAL theme colors, with ##g, ##o and ##a to choose these colors respectively. Fixed ImageRect move constructor. TextPreview class was cleaned up from unused functionality. Being name colors are no longer different between the name shown on the being and the name shown in the SpeechDialog.
2025-03-31GUI: Apply clipping only where necessaryThorbjørn Lindeijer1-1/+1
Clipping has been disabled globally by taking it out of Graphics::pushClipArea. Now its name is a little confusing, but it can't just be changed since it is part of Guichan. Widgets that do need to clip their children use the new Graphics::pushClipRect, which pushes a clipping rectangle without affecting the local coordinates. These are: * ScrollArea * TextField * TabbedArea (scrolling tabs) * MiniMap While it might count as a small optimization, I'm actually disabling clipping because it is not always desired. For example it gets in the way of rendering the complete ResizeGrip in the Jewelry theme because that's a child widget.
2025-02-26Plugged a few more memory leaksThorbjørn Lindeijer1-1/+2
* DebugWindow and SkillDialog were not deleting their tabs nor their tab widgets. * TabbedArea was not deleting its arrow buttons. * Button was deleting its TextPopup on deletion of the last Button instance, which was wrong because it was also being deleted by the WindowContainer. Also removed some misplaced event forwarding to the TextPopup. TabbedArea is tricky because it does not automatically delete added tabs or their widgets. Tab instances are only deleted when they were added by name. Issues found by Valgrind memory analyzer.
2025-01-21Replaced include guards with #pragma onceThorbjørn Lindeijer1-4/+1
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to remove duplicated newlines at end of file: find src -type f -name '*.h' -exec \ sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof Fixes compile on macOS, which appears to have been due to the EVENT_H include guard.
2024-03-12General code cleanupsThorbjørn Lindeijer1-2/+1
* Use default member initializers * Use range-based for loops * Avoid needless pointer references for ShopItem::mDuplicates * Removed type aliases that are only used once or twice * Removed more unused includes * Removed some unused functions * Removed superfluous .c_str() * Rely on default copy and assignment operators for Vector class * Use std::unique_ptr in some places * Removed duplicated mPlayerMoney updating in SellDialog * Removed duplicated Game::handleInput call * Removed unused SDLInput::mMouseInWindow * Removed remnant of manual widget positioning in HelpWindow * Removed superfluous initialization of static pointers
2024-02-13General code cleanupsThorbjørn Lindeijer1-3/+3
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-10/+10
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-05-05Fixed compilation errors and warnings with GCC 4.7Thorbjørn Lindeijer1-1/+2
Also, since GCC 4.7 there is a binary compatibility issue when linking with a Guichan that was not compiled in C++11 mode. This commit also allows compiling with GCC 4.7 with C++11 mode turned off. Reviewed-by: Erik Schilling
2012-02-10Arbitrary small code cleanupsThorbjørn Lindeijer1-2/+0
Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-08-11Added true arrows graphics to tab area buttons.Yohann Ferreira1-1/+1
2011-04-09Removed a lot of useless "documentation"Thorbjørn Lindeijer1-3/+0
I have to admit I contributed a large part of these. Sorry for that. Less empty space, more attention to the code. Acked-by: Jared Adams
2011-03-08Added a tab scrolling system in tabarea.Yohann Ferreira1-0/+43
Currently working on the chat window. Resolves: Mana-Mantis #308. Reviewed-by: Thorbjorn.
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-14Fixed TabbedAreas stealing click focus from their children widgets.Tametomo1-0/+3
Signed-off-by: Tametomo <irarice@gmail.com>
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2009-08-23Fix some layout issues with TabbedAreasJared Adams1-2/+1
2009-08-10Remove layout code from ChatWindowJared Adams1-0/+8
2009-08-10Fix TabbedArea and ScrollArea to resize contentsJared Adams1-1/+4
Also remove that code from SkillDialog. I tried to do the same with ChatWindow, but it kept segfaulting. Will try again later.
2009-07-07Use tmw-skills.xml instead of hardcodingJared Adams1-0/+5
2009-04-16Some more cleanupsBjørn Lindeijer1-16/+16
Nothing in particular worth mentioning.
2009-03-30Hilight chat tabs when appropriateJared Adams1-0/+5
2009-03-26Move ChatWindow over to ChatTabsJared Adams1-0/+4
TMWServ compilation is likely not functional after this, I didn't check. THe next commit will address that.
2009-03-26First batch of include cleanupBjørn Lindeijer1-2/+0
Since the relative includes are getting ugly and somewhat inconvenient, we'll switch to includes relative to the project root. We've done this for a while already with tmwserv. Another rule which we've always had but was never written down, is that each source file first includes its own header. This is common practice and ensures each header compiles without needing other stuff to be included first. Somebody using Code::Blocks might want to fix the project file by adding the 'src' directory to the list of include paths.
2009-01-25Removed the TMW branding from header guardsBjørn Lindeijer1-2/+2
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-13Merged Tab and TabbedArea from mainlineBjørn Lindeijer1-0/+92
Changes mostly done by David Athay. Currently these widgets are only used in the setup window, where they replace the previously used TabbedContainer.