~widelands-dev/widelands/bug-1806901_use_compile_sh_in_update_sh

« back to all changes in this revision

Viewing changes to src/ui_basic/table.cc

  • Committer: franku
  • Date: 2018-12-21 09:25:27 UTC
  • mfrom: (8937.1.8 trunk)
  • Revision ID: somal@arcor.de-20181221092527-f345bosb29a8uesc
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 *       y
40
40
 *       w       dimensions, in pixels, of the Table
41
41
 *       h
42
 
*/
 
42
 */
43
43
Table<void*>::Table(Panel* const parent,
44
44
                    int32_t x,
45
45
                    int32_t y,
80
80
 
81
81
/**
82
82
 * Free allocated resources
83
 
*/
 
83
 */
84
84
Table<void*>::~Table() {
85
85
        for (const EntryRecord* entry : entry_records_) {
86
86
                delete entry;
179
179
 
180
180
/**
181
181
 * Remove all entries from the table
182
 
*/
 
182
 */
183
183
void Table<void*>::clear() {
184
184
        for (const EntryRecord* entry : entry_records_) {
185
185
                delete entry;
215
215
 
216
216
/**
217
217
 * Redraw the table
218
 
*/
 
218
 */
219
219
void Table<void*>::draw(RenderTarget& dst) {
220
220
        //  draw text lines
221
221
        int32_t lineheight = get_lineheight();
538
538
 
539
539
/**
540
540
 * Add a new entry to the table.
541
 
*/
 
541
 */
542
542
Table<void*>::EntryRecord& Table<void*>::add(void* const entry, const bool do_select) {
543
543
        EntryRecord& result = *new EntryRecord(entry);
544
544
        entry_records_.push_back(&result);
554
554
 
555
555
/**
556
556
 * Scroll to the given position, in pixels.
557
 
*/
 
557
 */
558
558
void Table<void*>::set_scrollpos(int32_t const i) {
559
559
        scrollpos_ = i;
560
560
}
745
745
 
746
746
        return data_.at(col).d_string;
747
747
}
748
 
}
 
748
}  // namespace UI