29 #ifndef _GG_MultiEdit_h_
30 #define _GG_MultiEdit_h_
65 MultiEdit(
X x,
Y y,
X w,
Y h,
const std::string& str,
const boost::shared_ptr<Font>& font,
74 virtual Pt MinUsableSize()
const;
75 virtual Pt ClientLowerRight()
const;
83 std::size_t MaxLinesOfHistory()
const;
87 virtual void Render();
89 virtual void SizeMove(
const Pt& ul,
const Pt& lr);
91 virtual void SelectAll();
92 virtual void SetText(
const std::string& str);
99 void SetMaxLinesOfHistory(std::size_t max);
117 virtual bool MultiSelected()
const;
121 X RightMargin()
const;
125 Y BottomMargin()
const;
129 std::pair<std::size_t, CPSize> CharAt(
const Pt& pt)
const;
134 std::pair<std::size_t, CPSize> CharAt(
CPSize idx)
const;
137 Pt ScrollPosition()
const;
146 const std::vector<Font::LineData>* line_data = 0)
const;
150 X RowStartX(std::size_t row)
const;
154 X CharXOffset(std::size_t row,
CPSize idx)
const;
158 std::size_t RowAt(
Y y)
const;
162 CPSize CharAt(std::size_t row,
X x)
const;
165 std::size_t FirstVisibleRow()
const;
168 std::size_t LastVisibleRow()
const;
171 std::size_t FirstFullyVisibleRow()
const;
174 std::size_t LastFullyVisibleRow()
const;
178 CPSize FirstVisibleChar(std::size_t row)
const;
182 CPSize LastVisibleChar(std::size_t row)
const;
185 std::pair<std::size_t, CPSize> HighCursorPos()
const;
188 std::pair<std::size_t, CPSize> LowCursorPos()
const;
194 virtual void MouseWheel(
const Pt& pt,
int move,
Flags<ModKey> mod_keys);
195 virtual void KeyPress(
Key key, boost::uint32_t key_code_point,
Flags<ModKey> mod_keys);
198 void RecreateScrolls();
207 void PreserveTextPositionOnNextSetText();
216 void ValidateStyle();
217 void ClearSelected();
219 void AdjustScrolls();
220 void VScrolled(
int upper,
int lower,
int range_upper,
int range_lower);
221 void HScrolled(
int upper,
int lower,
int range_upper,
int range_lower);
225 std::pair<std::size_t, CPSize> m_cursor_begin;
226 std::pair<std::size_t, CPSize> m_cursor_end;
234 std::size_t m_max_lines_history;
239 bool m_preserve_text_position_on_next_set_text;
240 bool m_ignore_adjust_scrolls;