rubidium
e63137f47f
(svn r13041) -Fix: calling a virtual function on a not fully constructed object is bound to cause errors.
2008-05-11 11:41:18 +00:00
rubidium
83664c8bc4
(svn r13031) -Codechange: make AssignWidgetToWindow a static function instead of a global one as it should only be used from window.cpp.
2008-05-10 13:54:20 +00:00
rubidium
89c15ecb23
(svn r13030) -Codechange: do use MallocT instead of ReallocT when 100% sure that the pointer you are allocating to is NULL. Patch by Alberth.
2008-05-10 13:53:11 +00:00
rubidium
d24442ae8b
(svn r13029) -Codechange: more work in the road to getting the WP macros and byte[WINDOW_CUSTOM_SIZE] removed. This step changes the event handling to work directly on the Window class instead of via a function pointer and big switches while keeping backward compatability while we're rewriting the Windows to the new scheme.
2008-05-10 13:46:36 +00:00
rubidium
935434333b
(svn r13028) -Codechange: WE_MESSAGE and WE_INVALIDATE_DATA were doing the same thing.
2008-05-10 12:30:27 +00:00
rubidium
68a1d75d9e
(svn r13025) -Codechange: remove the need for two WindowEvents.
2008-05-09 15:27:00 +00:00
rubidium
f438700402
(svn r13024) -Codechange: do not use WE_MOUSELOOP when WE_TICK suffices, rename WE_4 to something more descriptive and correct some (completely incorrect) comments.
2008-05-09 09:29:27 +00:00
rubidium
9ed36409c5
(svn r13006) -Codechange: GetMenuItemIndex is only used for the toolbar, so move it to there.
2008-05-08 12:59:47 +00:00
rubidium
23fc96c3e8
(svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window.
2008-05-08 11:50:34 +00:00
rubidium
2eef026fe3
(svn r13004) -Codechange: replace AllocateWindow and AllocateWindowDesc with a Window constructor.
2008-05-08 11:31:41 +00:00
rubidium
19910188fa
(svn r12999) -Fix [FS#1995]: when a Window got deleted on a double click event, we should not send a click event to the now non-existant Window as that causes segfaults.
2008-05-07 21:45:27 +00:00
rubidium
3d5567ccf7
(svn r12987) -Codechange: split viewport and tile selection.
2008-05-07 13:10:15 +00:00
rubidium
ca4349b517
(svn r12984) -Codechange: some coding style in window.cpp.
2008-05-07 08:27:55 +00:00
rubidium
402a1e24ba
(svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations.
2008-05-06 22:17:12 +00:00
rubidium
9bf519f26b
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
2008-05-06 22:08:18 +00:00
rubidium
e6c944a6c4
(svn r12975) -Codechange: replace DeleteWindow(w) with delete w.
2008-05-06 21:28:30 +00:00
rubidium
d03994098b
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
2008-05-06 15:11:33 +00:00
rubidium
762315c47c
(svn r12942) -Fix [FS#1979]: closing some windows caused recursion in the Window deletion causing the reading invalid/freed data which could cause crashes.
2008-05-04 21:36:37 +00:00
rubidium
cb680474c3
(svn r12941) -Codechange: don't access wndproc directly. Patch by Alberth.
2008-05-04 10:05:50 +00:00
rubidium
a26b25aecc
(svn r12938) -Codechange: coding style fixes. Patch by Alberth.
2008-05-04 08:56:59 +00:00
rubidium
5b44c68b19
(svn r12937) -Codechange: split allocating and finding the spot to place a window. Patch by Alberth.
2008-05-04 08:49:57 +00:00
rubidium
752c8d8f2e
(svn r12790) -Codechange: code style fixes. Patch by Alberth.
2008-04-19 13:28:48 +00:00
rubidium
c84fe27ca9
(svn r12787) -Documentation: add/fix documentation of some functions. Patch by Alberth.
2008-04-19 13:05:05 +00:00
rubidium
b1d1a4ac66
(svn r12757) -Codechange: move all cheat related stuff from all over the place to a single location.
2008-04-17 21:21:01 +00:00
rubidium
c31287206d
(svn r12749) -Codechange: store the viewport information in the windows that have a viewport instead of one global array with a viewport for each window, even when they do not use the viewport.
2008-04-17 09:42:44 +00:00
rubidium
fd38b3f850
(svn r12714) -Fix [FS#1904]: do not move windows below the toolbar on resizes unless they would go behind the toolbar.
2008-04-14 23:26:31 +00:00
rubidium
9a73b698d4
(svn r12695) -Codechange: only allocate window structs when needed. Based on a patch by Alberth.
2008-04-13 19:25:14 +00:00
rubidium
04138ddffc
(svn r12694) -Fix: do not call the mouse over callback on already deleted windows.
2008-04-13 19:06:30 +00:00
rubidium
2310557716
(svn r12693) -Documentation: add some documentation to some window related stuff. Based on a patch by Albert.
2008-04-13 19:01:26 +00:00
rubidium
87ddcb0d5a
(svn r12692) -Codechange: swap to functions to remove a function declaration.
2008-04-13 18:59:32 +00:00
rubidium
ee02dd7dad
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
2008-04-07 20:28:58 +00:00
smatz
756e0d9b6e
(svn r12371) -Fix [FS#1823]: do not let window hide behind the main toolbar after resizing the screen
2008-03-15 20:32:42 +00:00
smatz
8b56e7544e
(svn r12167) -Feature(tte): change colour of autorail and autoroad selection when Ctrl is pressed
2008-02-17 17:00:43 +00:00
smatz
291931bf50
(svn r12166) -Fix [FS#337]: when drag&drop mode was cancelled by keyboard input, depot/group window wasn't updated (original patch by GrimRC)
2008-02-17 12:21:05 +00:00
rubidium
dc87b05e8c
(svn r11834) -Codechange: only include settings_type.h if needed.
2008-01-13 14:37:30 +00:00
rubidium
5c4150d304
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
2008-01-13 13:36:01 +00:00
rubidium
d4e6a6bf57
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
2008-01-13 01:21:35 +00:00
rubidium
ac528411df
(svn r11818) -Codechange: split player.h into smaller pieces.
2008-01-12 14:10:35 +00:00
rubidium
0e517fe023
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
2008-01-09 09:45:45 +00:00
egladil
9a2547b5a7
(svn r11740) -Fix [FS#1610]: Modify and possibly discard key events for code points in the unicode private use area.
2008-01-01 18:55:15 +00:00
rubidium
384503e7d3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
rubidium
2786d789a1
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
2007-12-26 11:45:43 +00:00
rubidium
429521a7d1
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
2007-12-25 11:26:07 +00:00
rubidium
bf98e25e43
(svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed.
2007-12-25 09:48:53 +00:00
rubidium
a773d45885
(svn r11684) -Codechange: split gfx.h in a type and functional header.
2007-12-23 10:56:02 +00:00
rubidium
8f0e68285b
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
2007-12-22 23:30:28 +00:00
rubidium
8896bea306
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
2007-12-19 19:44:29 +00:00
rubidium
a0f2366e40
(svn r11629) -Fix [FS#1527]: many viewports could crash the scenario editor.
2007-12-13 18:46:04 +00:00
belugas
73c58d8a40
(svn r11596) -Codechange: Use the Window member HandleButtonClick and remove its now useless counterpart function
2007-12-08 03:10:50 +00:00
belugas
b23f824f18
(svn r11595) -Codechange: add a new member to Window struct, based on its function counterpart HandleButtonClick.
2007-12-08 02:55:47 +00:00
belugas
af4d07b978
(svn r11593) -Cleanup: remove some forgotten pieces of evidence of a mischief
2007-12-08 01:30:18 +00:00
belugas
8c89641dbe
(svn r11592) -Codechange: Use the Window member RaiseButtons and remove the now useless RaiseWindowButtons function
2007-12-08 01:20:47 +00:00
belugas
6fb71047d6
(svn r11591) -Codechange: remove now unused widget accessors.
2007-12-08 01:02:19 +00:00
glx
c21f588a14
(svn r11588) -Codechange: use the new member introduced in r11551
2007-12-07 18:05:49 +00:00
glx
10e17c30a3
(svn r11586) -Fix: make another widget 'accessor' function const when it should be const.
2007-12-07 17:42:15 +00:00
rubidium
dd68a34e26
(svn r11583) -Fix [FS#1484]: windows could get completely missing when one resized the window to something very small.
2007-12-06 20:55:48 +00:00
belugas
6c70cf2d82
(svn r11579) -Revert(r11578): some cases of key propagation are not handled correctly.
...
A better solution will be deviced, but not now. Let's not cause a ton of bug reports
2007-12-06 15:58:39 +00:00
belugas
7edf28529d
(svn r11578) -Codechange: Introduce the window default flag WDF_TEXTENTRY which specifies that the window holding it is actually one that enables an edit box.
...
Use this flag when dispatching a key event instead of using some hard coded window IDs.
This should ease a little bit the creation of new edit aware windows.
2007-12-06 02:31:47 +00:00
rubidium
d9081ad3f5
(svn r11556) -Feature: allow setting a default password for new companies in network games.
2007-12-02 14:48:26 +00:00
rubidium
527b72749d
(svn r11555) -Codechange: use the new members introduced in r11551.
2007-12-02 14:29:48 +00:00
belugas
e2b4afaa4b
(svn r11551) -Codechange: Introduction of widget control members on struct Window. These "new" members have the exact same functionalities as their pure functions "genitors"
...
Ex: "Window::SetWidgetLoweredState(byte widget_index, bool lowered_stat)" is the member corresponding to "SetWindowWidgetLoweredState(Window *w, byte widget_index, bool lowered_stat)"
2007-12-02 00:59:48 +00:00
skidd13
bf959f926f
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
2007-11-24 10:38:43 +00:00
skidd13
71c4325c50
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
skidd13
8be526e499
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
2007-11-19 18:38:10 +00:00
smatz
2686901d84
(svn r11471) -Codechange: one more variable retyped to enum ViewportHighlightMode
2007-11-18 23:13:53 +00:00
truelight
d8d0babece
(svn r11405) -Fix: in rare cases OpenTTD could segfault when resizing and scroll the main window (Rafal Rzepecki)
2007-11-11 12:26:44 +00:00
belugas
705f0ae90c
(svn r11304) -Feature: Control-Clicking the Center Main View button on the vehicle window allows the main viewport to follow the chosen vehicle.(stevenh)
2007-10-20 00:09:39 +00:00
belugas
c78c96a8ad
(svn r11256) -Codechange: Make opening a new toolbar not overlapping its parent one, by locating it under the parent, and aligned with the left side of it.
...
FS#1310, by BigBB
2007-10-14 00:26:24 +00:00
truelight
da8d778622
(svn r10967) -Fix: in case of moving the window on create (because it doesn't fit in the screen), make sure to move the viewport too if we are an extra viewport (spotted by Maedhros)
2007-08-23 11:08:59 +00:00
rubidium
0fed821efb
(svn r10932) -Codechange: replace "text" with "chat" for the chat related function and variables.
2007-08-19 09:38:30 +00:00
rubidium
cffc67aae8
(svn r10730) -Codechange: allow (some) arbitrary data to be send to the WE_CREATE event.
2007-07-29 22:57:40 +00:00
rubidium
1ff82506a0
(svn r10727) -Codechange: when a window would fall outside of the screen (on the right) when opening it, move it to the left so it stays inside the screen.
2007-07-29 20:54:37 +00:00
rubidium
dd0fac984b
(svn r10726) -Codechange: make it possible that the chat window is less than 640 pixels.
2007-07-29 19:19:30 +00:00
rubidium
59ff947471
(svn r10725) -Codechange: move some window related code out of gfx.cpp to windows.cpp
2007-07-29 19:18:22 +00:00
rubidium
aeb992ce90
(svn r10717) -Fix: in-game console had a "transparent" part when opened in a game, while it did not in the menu.
2007-07-28 21:00:31 +00:00
rubidium
b6c3a127af
(svn r10716) -Codechange: not all windows' minimum size is actually their minimum size, so take the size of the window after WE_CREATE has been called as bare minimum size.
2007-07-28 20:59:30 +00:00
rubidium
e68a3e9777
(svn r10707) -Codechange: account for the main toolbar and status bar when determining the maximum height for a window.
2007-07-27 22:08:59 +00:00
rubidium
8b5961d5e0
(svn r10705) -Fix (r10704): some windows were not correctly initialized as they resized the window themselves and that should be interfered by making sure the window is resized in the right "step" size.
...
-Fix (r10704): call the WE_RESIZE when resizing during initialization of the windows.
2007-07-27 19:09:31 +00:00
rubidium
c03cb2c8db
(svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size.
2007-07-27 12:49:04 +00:00
peter1138
724ac18d1e
(svn r10649) -Fix (r9962): autoscroll (pointer near screen edge) didn't work
2007-07-22 13:16:49 +00:00
rubidium
5b90b91ce3
(svn r10465) -Fix: first run the WE_CREATE callback and then perform the dirtying of the window, so you won't get glitches if you resize a window in the WE_CREATE callback.
2007-07-07 17:33:29 +00:00
rubidium
36945fd628
(svn r10333) -Fix [FS#943]: News messages were shown on top of the endgame screen and high score chart.
2007-06-25 21:36:16 +00:00
truelight
2e19d3cf78
(svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
...
-Codechange: renamed _timer_counter to _palette_animation_counter, as that is what it is
2007-06-22 20:04:21 +00:00
truelight
6159f58948
(svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action
2007-06-22 10:57:53 +00:00
truelight
003375d375
(svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
...
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
Note: this allows much easier adding other types of video-drivers, like OpenGL
2007-06-17 20:30:28 +00:00
truelight
f3f744d36a
(svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
...
-Add: added NULL blitter and renderer, which are always used for -vnull
-Add: dedicated driver doesn't blit nor render by default. Can be overruled by user. (-D -b 8bpp-optimized)
-Remove: removed CTRL+D from win32, which is incompatible with above
-Add: extended screenshot support for PNG and BMP
-Codechange: remove all hardcoded 8bpp references and replace them with more dynamic ones
-Codechange: minor stuff in blitters
2007-06-12 20:24:12 +00:00
truelight
765c466b8d
(svn r9846) -Codechange: introduced ZOOM_LVL_MIN and ZOOM_LVL_MAX for the obvious reasons
...
-Codechange: introduced ZOOM_LVL_DETAIL to show/remove details
-Codechange: changed << and >> operator with ZoomLevel to a simple wrapper (that in theory also allows zoom-in besides the current zoom-out)
-Fix r9845: missed some int -> ZoomLevel
2007-05-15 16:08:46 +00:00
truelight
d3f375231f
(svn r9844) -Codechange: replace zoomlevel with an enum
...
-Codechange: use predefined enums for viewport zoomlevels
2007-05-15 14:08:39 +00:00
peter1138
5577d5c86c
(svn r9720) -Codechange: Remove global var and gotos from window autoplacement
2007-04-26 17:32:54 +00:00
rubidium
2dc5589290
(svn r9673) -Cleanup: remove spaces before tabs and replace non-indenting tabs with spaces.
2007-04-18 22:41:53 +00:00
rubidium
80c259f64f
(svn r9672) -Cleanup: lots of coding style fixes around operands.
2007-04-18 22:10:36 +00:00
belugas
607a55f4ec
(svn r9662) -Documentation: Doxygen corrections and @file omissions
2007-04-17 20:23:13 +00:00
belugas
82ad5a6d9c
(svn r9580) -Documentation: Correction of doxygen function declarations
2007-04-09 15:06:24 +00:00
belugas
d4d5ce7ee5
(svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible
2007-04-06 04:10:19 +00:00
bjarni
4cc3551ef2
(svn r9126) -Feature: "Function of scrollwheel" can now be set to off as well
...
Note: since this can be useful for all platforms, the GUI is no longer OSX specific.
Note: scrolling lists is still unaffected by this setting
2007-03-11 21:53:46 +00:00
bjarni
9be41fede6
(svn r9112) -Feature r9111: scrollwheel scrolling can now also scroll the smallmap
2007-03-11 11:57:11 +00:00
bjarni
50fe0fe059
(svn r9111) -Feature: [OSX] mighty mice and touchpads can now scroll the map (in all directions)
...
It has to be enabled first (in patches->interface) first and this will disable scrollwheel zooming
Note: patch setting "Map scrollwheel speed" might need to be changed since the "correct" setting
appears to depend on what kind of mouse is in use (mighty mouse or touchpad)
2007-03-11 10:55:35 +00:00
rubidium
24c4d5b06d
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
2007-03-07 12:11:48 +00:00
rubidium
36bb92ae24
(svn r9050) -Codechange: Foo(void) -> Foo()
2007-03-07 11:47:46 +00:00
truelight
43133c766c
(svn r9034) -Codechange: renamed _pause to _pause_game, as some targets already have
...
a symbol called _pause (and therefor our variable conflicts with
thatone. We shouldn't be using _ as global indicator.....)
2007-03-06 20:59:52 +00:00
belugas
a723770836
(svn r8853) -Cleanup: doxygen changes. Correct forgotten c files to cpp files with the @file tag as well as a few general comments style
2007-02-23 01:48:53 +00:00
rubidium
904088f2f9
(svn r8533) -Fix: segmentation fault when the toolbar gets removed and you have selected one of the items in a submenu of the toolbar.
2007-02-02 14:32:23 +00:00
Darkvater
e832a1d046
(svn r8101) -Fix (runknown): Plug potential memleaks when calling UnInitWindowSystem. The function directly deleted all windows instead of calling their respective deallocators which could then in turn any used memory.
2007-01-13 15:50:36 +00:00
KUDr
33be1ecfb1
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
2007-01-11 17:29:39 +00:00
rubidium
f35ed4bbc2
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
e373ea7096
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00