changeset 12708:f1e888f0b9e1 draft

(svn r17171) -Doc: Additions and corrections of various doxygen strings.
author alberth <alberth@openttd.org>
date Fri, 14 Aug 2009 18:41:03 +0000
parents 3aa1953c3734
children 68ed90d9df5f
files src/industry_gui.cpp src/news_gui.cpp src/viewport.cpp src/widget.cpp src/widget_type.h src/widgets/dropdown.cpp src/window_gui.h
diffstat 7 files changed, 21 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -32,10 +32,11 @@
 
 bool _ignore_restrictions;
 
+/** Cargo suffix type (for which window is it requested) */
 enum CargoSuffixType {
-	CST_FUND,
-	CST_VIEW,
-	CST_DIR,
+	CST_FUND,  ///< Fund-industry window
+	CST_VIEW,  ///< View-industry window
+	CST_DIR,   ///< Industry-directory window
 };
 
 /**
@@ -46,7 +47,7 @@
  * - 02 - third accepted cargo type
  * - 03 - first produced cargo type
  * - 04 - second produced cargo type
- * @param cst the cargo suffix type (for which window is it requested)
+ * @param cst the cargo suffix type (for which window is it requested). @see CargoSuffixType
  * @param ind the industry (NULL if in fund window)
  * @param ind_type the industry type
  * @param indspec the industry spec
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -29,7 +29,7 @@
 #define NB_WIDG_PER_SETTING 4
 
 NewsItem _statusbar_news_item;
-bool _news_ticker_sound;
+bool _news_ticker_sound; ///< Make a ticker sound when a news item is published.
 
 static uint MIN_NEWS_AMOUNT = 30;           ///< prefered minimum amount of news messages
 static uint _total_news = 0;                ///< current number of news items
@@ -941,7 +941,7 @@
 static const StringID _message_opt[] = {STR_NEWS_MESSAGES_OFF, STR_NEWS_MESSAGES_SUMMARY, STR_NEWS_MESSAGES_FULL, INVALID_STRING_ID};
 
 struct MessageOptionsWindow : Window {
-	int state;
+	int state; ///< Option value for setting all categories at once.
 
 	MessageOptionsWindow(const WindowDesc *desc) : Window(desc)
 	{
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2121,6 +2121,10 @@
 	}
 }
 
+/** Highlight \a w by \a h tiles at the cursor.
+ * @param w Width of the highlighted tiles rectangle.
+ * @param h Height of the highlighted tiles rectangle.
+ */
 void SetTileSelectSize(int w, int h)
 {
 	_thd.new_size.x = w * TILE_SIZE;
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -825,7 +825,7 @@
 
 
 /**
- * @defgroup NestedWidgets Hierarchical widgets.
+ * @defgroup NestedWidgets Hierarchical widgets
  * Hierarchical widgets, also known as nested widgets, are widgets stored in a tree. At the leafs of the tree are (mostly) the 'real' widgets
  * visible to the user. At higher levels, widgets get organized in container widgets, until all widgets of the window are merged.
  *
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -617,7 +617,7 @@
 /**
  * Widget part function for setting the resize step.
  * @param dx Horizontal resize step. 0 means no horizontal resizing.
- * @param dy Vertical resize step. 0 means no horizontal resizing.
+ * @param dy Vertical resize step. 0 means no vertical resizing.
  * @ingroup NestedWidgetParts
  */
 static inline NWidgetPart SetResize(int16 dx, int16 dy)
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -77,9 +77,9 @@
 };
 
 struct DropdownWindow : Window {
-	WindowClass parent_wnd_class;
-	WindowNumber parent_wnd_num;
-	byte parent_button;
+	WindowClass parent_wnd_class; ///< Parent window class.
+	WindowNumber parent_wnd_num;  ///< Parent window number.
+	byte parent_button;           ///< Parent widget number where the window is dropped from.
 	DropDownList *list;
 	int selected_index;
 	byte click_delay;
@@ -388,6 +388,7 @@
 /**
  * Delete the drop-down menu from window \a pw
  * @param pw Parent window of the drop-down menu window
+ * @return Parent widget number if the drop-down was found and closed, \c -1 if the window was not found.
  */
 int HideDropDownMenu(Window *pw)
 {
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -188,10 +188,11 @@
 	uint step_height; ///< Step-size of height resize changes
 };
 
+/** State of a sort direction button. */
 enum SortButtonState {
-	SBS_OFF,
-	SBS_DOWN,
-	SBS_UP,
+	SBS_OFF,  ///< Do not sort (with this button).
+	SBS_DOWN, ///< Sort ascending.
+	SBS_UP,   ///< Sort descending.
 };
 
 /**