equal
deleted
inserted
replaced
34 pt.x = top; |
34 pt.x = top; |
35 pt.y = bottom - 1; |
35 pt.y = bottom - 1; |
36 return pt; |
36 return pt; |
37 } |
37 } |
38 |
38 |
39 /***************************************************** |
39 /** Special handling for the scrollbar widget type. |
40 * Special handling for the scrollbar widget type. |
|
41 * Handles the special scrolling buttons and other |
40 * Handles the special scrolling buttons and other |
42 * scrolling. |
41 * scrolling. |
43 * Parameters: |
42 * @param w Window on which a scroll was performed. |
44 * wi - Pointer to the scrollbar widget. |
43 * @param wi Pointer to the scrollbar widget. |
45 * x - The X coordinate of the mouse click. |
44 * @param x The X coordinate of the mouse click. |
46 * y - The Y coordinate of the mouse click. |
45 * @param y The Y coordinate of the mouse click. */ |
47 */ |
|
48 |
|
49 void BaseWindow::ScrollbarClickHandler(const OldWidget *wi, int x, int y) |
46 void BaseWindow::ScrollbarClickHandler(const OldWidget *wi, int x, int y) |
50 { |
47 { |
51 int mi, ma, pos; |
48 int mi, ma, pos; |
52 Scrollbar *sb; |
49 Scrollbar *sb; |
53 |
50 |
124 this->SetDirty(); |
121 this->SetDirty(); |
125 } |
122 } |
126 |
123 |
127 /** Returns the index for the widget located at the given position |
124 /** Returns the index for the widget located at the given position |
128 * relative to the window. It includes all widget-corner pixels as well. |
125 * relative to the window. It includes all widget-corner pixels as well. |
129 * @param x |
126 * @param x The Window client X coordinate |
130 * @param y Window client coordinates |
127 * @param y The Window client y coordinate |
131 * @return A widget index, or -1 if no widget was found. |
128 * @return A widget index, or -1 if no widget was found. |
132 */ |
129 */ |
133 int BaseWindow::GetWidgetFromPos(int x, int y) const |
130 int BaseWindow::GetWidgetFromPos(int x, int y) const |
134 { |
131 { |
135 uint index; |
132 uint index; |
733 w->widget[c].left = w->widget[b].right + 1; |
730 w->widget[c].left = w->widget[b].right + 1; |
734 } |
731 } |
735 |
732 |
736 /** Evenly distribute some widgets when resizing horizontally (often a button row) |
733 /** Evenly distribute some widgets when resizing horizontally (often a button row) |
737 * When only two arguments are given, the widgets are presumed to be on a line and only the ends are given |
734 * When only two arguments are given, the widgets are presumed to be on a line and only the ends are given |
|
735 <<<<<<< .working |
|
736 ======= |
|
737 * @param w Window to modify |
|
738 >>>>>>> .merge-right.r9707 |
738 * @param left The leftmost widget to resize |
739 * @param left The leftmost widget to resize |
739 * @param right The rightmost widget to resize. Since right side of it is used, remember to set it to RESIZE_RIGHT |
740 * @param right The rightmost widget to resize. Since right side of it is used, remember to set it to RESIZE_RIGHT |
740 */ |
741 */ |
741 void BaseWindow::ResizeButtons(byte first, byte last) |
742 void BaseWindow::ResizeButtons(byte first, byte last) |
742 { |
743 { |