00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 INLINE PN_stdfloat TextNode::
00026 get_line_height() const {
00027 TextFont *font = get_font();
00028 if (font == (TextFont *)NULL) {
00029 return 0.0f;
00030 }
00031
00032 return font->get_line_height();
00033 }
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 INLINE void TextNode::
00044 set_max_rows(int max_rows) {
00045 _max_rows = max_rows;
00046 invalidate_with_measure();
00047 }
00048
00049
00050
00051
00052
00053
00054
00055 INLINE void TextNode::
00056 clear_max_rows() {
00057 _max_rows = 0;
00058 invalidate_with_measure();
00059 }
00060
00061
00062
00063
00064
00065
00066
00067 INLINE bool TextNode::
00068 has_max_rows() const {
00069 return _max_rows > 0;
00070 }
00071
00072
00073
00074
00075
00076
00077
00078 INLINE int TextNode::
00079 get_max_rows() const {
00080 return _max_rows;
00081 }
00082
00083
00084
00085
00086
00087
00088
00089
00090 INLINE bool TextNode::
00091 has_overflow() const {
00092 check_measure();
00093 return (_flags & F_has_overflow) != 0;
00094 }
00095
00096
00097
00098
00099
00100
00101 INLINE void TextNode::
00102 set_frame_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
00103 set_frame_color(LColor(r, g, b, a));
00104 }
00105
00106
00107
00108
00109
00110
00111 INLINE void TextNode::
00112 set_frame_color(const LColor &frame_color) {
00113 if (_frame_color != frame_color) {
00114 _frame_color = frame_color;
00115 invalidate_no_measure();
00116 }
00117 }
00118
00119
00120
00121
00122
00123
00124 INLINE LColor TextNode::
00125 get_frame_color() const {
00126 return _frame_color;
00127 }
00128
00129
00130
00131
00132
00133
00134 INLINE void TextNode::
00135 set_card_border(PN_stdfloat size, PN_stdfloat uv_portion) {
00136 if (!has_card_border() || _card_border_size != size || _card_border_uv_portion != uv_portion) {
00137 _flags |= F_has_card_border;
00138 _card_border_size = size;
00139 _card_border_uv_portion = uv_portion;
00140 invalidate_no_measure();
00141 }
00142 }
00143
00144
00145
00146
00147
00148
00149 INLINE void TextNode::
00150 clear_card_border() {
00151 if (has_card_border()) {
00152 _flags &= ~F_has_card_border;
00153 invalidate_no_measure();
00154 }
00155 }
00156
00157
00158
00159
00160
00161
00162 INLINE PN_stdfloat TextNode::
00163 get_card_border_size() const {
00164 return _card_border_size;
00165 }
00166
00167
00168
00169
00170
00171
00172 INLINE PN_stdfloat TextNode::
00173 get_card_border_uv_portion() const {
00174 return _card_border_uv_portion;
00175 }
00176
00177
00178
00179
00180
00181
00182 INLINE bool TextNode::
00183 has_card_border() const {
00184 return (_flags & F_has_card_border) != 0;
00185 }
00186
00187
00188
00189
00190
00191
00192 INLINE void TextNode::
00193 set_card_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
00194 set_card_color(LColor(r, g, b, a));
00195 }
00196
00197
00198
00199
00200
00201
00202 INLINE void TextNode::
00203 set_card_color(const LColor &card_color) {
00204 if (_card_color != card_color) {
00205 _card_color = card_color;
00206 invalidate_no_measure();
00207 }
00208 }
00209
00210
00211
00212
00213
00214
00215 INLINE LColor TextNode::
00216 get_card_color() const {
00217 return _card_color;
00218 }
00219
00220
00221
00222
00223
00224
00225 INLINE void TextNode::
00226 set_card_texture(Texture *card_texture) {
00227 if (card_texture == (Texture *)NULL) {
00228 clear_card_texture();
00229 } else {
00230 if (!has_card_texture() || _card_texture != card_texture) {
00231 _flags |= F_has_card_texture;
00232 _card_texture = card_texture;
00233 invalidate_no_measure();
00234 }
00235 }
00236 }
00237
00238
00239
00240
00241
00242
00243 INLINE void TextNode::
00244 clear_card_texture() {
00245 if (has_card_texture()) {
00246 _flags &= ~F_has_card_texture;
00247 _card_texture = NULL;
00248 invalidate_no_measure();
00249 }
00250 }
00251
00252
00253
00254
00255
00256
00257 INLINE bool TextNode::
00258 has_card_texture() const {
00259 return (_flags & F_has_card_texture) != 0;
00260 }
00261
00262
00263
00264
00265
00266
00267 INLINE Texture *TextNode::
00268 get_card_texture() const {
00269 return _card_texture;
00270 }
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281 INLINE void TextNode::
00282 set_frame_as_margin(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
00283 _flags |= (F_has_frame | F_frame_as_margin);
00284 _frame_ul.set(left, top);
00285 _frame_lr.set(right, bottom);
00286 invalidate_no_measure();
00287 }
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299 INLINE void TextNode::
00300 set_frame_actual(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
00301 _flags |= F_has_frame;
00302 _flags &= ~F_frame_as_margin;
00303 _frame_ul.set(left, top);
00304 _frame_lr.set(right, bottom);
00305 invalidate_no_measure();
00306 }
00307
00308
00309
00310
00311
00312
00313
00314 INLINE void TextNode::
00315 clear_frame() {
00316 _flags &= ~F_has_frame;
00317 invalidate_no_measure();
00318 }
00319
00320
00321
00322
00323
00324
00325 INLINE bool TextNode::
00326 has_frame() const {
00327 return (_flags & F_has_frame) != 0;
00328 }
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341 INLINE bool TextNode::
00342 is_frame_as_margin() const {
00343 nassertr(has_frame(), false);
00344 return (_flags & F_frame_as_margin) != 0;
00345 }
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356 INLINE LVecBase4 TextNode::
00357 get_frame_as_set() const {
00358 nassertr(has_frame(), LVecBase4(0.0, 0.0, 0.0, 0.0));
00359 return LVecBase4(_frame_ul[0], _frame_lr[0], _frame_lr[1], _frame_ul[1]);
00360 }
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376 INLINE LVecBase4 TextNode::
00377 get_frame_actual() const {
00378 if (!has_frame()) {
00379 check_measure();
00380 return LVecBase4(_text_ul[0], _text_lr[0], _text_lr[1], _text_ul[1]);
00381
00382 } else if (is_frame_as_margin()) {
00383 check_measure();
00384 return LVecBase4(_text_ul[0] - _frame_ul[0],
00385 _text_lr[0] + _frame_lr[0],
00386 _text_lr[1] - _frame_lr[1],
00387 _text_ul[1] + _frame_ul[1]);
00388 } else {
00389 return get_frame_as_set();
00390 }
00391 }
00392
00393
00394
00395
00396
00397
00398
00399 INLINE void TextNode::
00400 set_frame_line_width(PN_stdfloat frame_width) {
00401 _frame_width = frame_width;
00402 invalidate_no_measure();
00403 }
00404
00405
00406
00407
00408
00409
00410
00411 INLINE PN_stdfloat TextNode::
00412 get_frame_line_width() const {
00413 return _frame_width;
00414 }
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424 INLINE void TextNode::
00425 set_frame_corners(bool corners) {
00426 if (corners) {
00427 _flags |= F_frame_corners;
00428 } else {
00429 _flags &= ~F_frame_corners;
00430 }
00431 invalidate_no_measure();
00432 }
00433
00434
00435
00436
00437
00438
00439 INLINE bool TextNode::
00440 get_frame_corners() const {
00441 return (_flags & F_frame_corners) != 0;
00442 }
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454 INLINE void TextNode::
00455 set_card_as_margin(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
00456 _flags |= (F_has_card | F_card_as_margin);
00457 _card_ul.set(left, top);
00458 _card_lr.set(right, bottom);
00459 invalidate_no_measure();
00460 }
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472 INLINE void TextNode::
00473 set_card_actual(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
00474 _flags |= F_has_card;
00475 _flags &= ~F_card_as_margin;
00476 _card_ul.set(left, top);
00477 _card_lr.set(right, bottom);
00478 invalidate_no_measure();
00479 }
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489 INLINE void TextNode::
00490 set_card_decal(bool card_decal) {
00491 if (card_decal) {
00492 _flags |= F_card_decal;
00493 } else {
00494 _flags &= ~F_card_decal;
00495 }
00496 invalidate_no_measure();
00497 }
00498
00499
00500
00501
00502
00503
00504
00505 INLINE void TextNode::
00506 clear_card() {
00507 _flags &= ~F_has_card;
00508 invalidate_no_measure();
00509 }
00510
00511
00512
00513
00514
00515
00516 INLINE bool TextNode::
00517 has_card() const {
00518 return (_flags & F_has_card) != 0;
00519 }
00520
00521
00522
00523
00524
00525
00526 INLINE bool TextNode::
00527 get_card_decal() const {
00528 return (_flags & F_card_decal) != 0;
00529 }
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 INLINE bool TextNode::
00543 is_card_as_margin() const {
00544 nassertr(has_card(), false);
00545 return (_flags & F_card_as_margin) != 0;
00546 }
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557 INLINE LVecBase4 TextNode::
00558 get_card_as_set() const {
00559 nassertr(has_card(), LVecBase4(0.0, 0.0, 0.0, 0.0));
00560 return LVecBase4(_card_ul[0], _card_lr[0], _card_lr[1], _card_ul[1]);
00561 }
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577 INLINE LVecBase4 TextNode::
00578 get_card_actual() const {
00579 if (!has_card()) {
00580 check_measure();
00581 return LVecBase4(_text_ul[0], _text_lr[0], _text_lr[1], _text_ul[1]);
00582
00583 } else if (is_card_as_margin()) {
00584 check_measure();
00585 return LVecBase4(_text_ul[0] - _card_ul[0],
00586 _text_lr[0] + _card_lr[0],
00587 _text_lr[1] - _card_lr[1],
00588 _text_ul[1] + _card_ul[1]);
00589 } else {
00590 return get_card_as_set();
00591 }
00592 }
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603 INLINE LVecBase4 TextNode::
00604 get_card_transformed() const {
00605 LVecBase4 card = get_card_actual();
00606 LPoint3 ul = LPoint3(card[0], 0.0, card[3]) * _transform;
00607 LPoint3 lr = LPoint3(card[1], 0.0, card[2]) * _transform;
00608
00609 return LVecBase4(ul[0], lr[0], lr[2], ul[2]);
00610 }
00611
00612
00613
00614
00615
00616
00617
00618 INLINE void TextNode::
00619 set_transform(const LMatrix4 &transform) {
00620 _transform = transform;
00621 invalidate_with_measure();
00622 }
00623
00624
00625
00626
00627
00628
00629 INLINE LMatrix4 TextNode::
00630 get_transform() const {
00631 return _transform;
00632 }
00633
00634
00635
00636
00637
00638
00639
00640 INLINE void TextNode::
00641 set_coordinate_system(CoordinateSystem coordinate_system) {
00642 _coordinate_system = coordinate_system;
00643 invalidate_with_measure();
00644 }
00645
00646
00647
00648
00649
00650
00651 INLINE CoordinateSystem TextNode::
00652 get_coordinate_system() const {
00653 return _coordinate_system;
00654 }
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666 INLINE void TextNode::
00667 set_usage_hint(Geom::UsageHint usage_hint) {
00668 _usage_hint = usage_hint;
00669 invalidate_no_measure();
00670 }
00671
00672
00673
00674
00675
00676
00677
00678 INLINE Geom::UsageHint TextNode::
00679 get_usage_hint() const {
00680 return _usage_hint;
00681 }
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727 INLINE void TextNode::
00728 set_flatten_flags(int flatten_flags) {
00729 _flatten_flags = flatten_flags;
00730 }
00731
00732
00733
00734
00735
00736
00737 INLINE int TextNode::
00738 get_flatten_flags() const {
00739 return _flatten_flags;
00740 }
00741
00742
00743
00744
00745
00746
00747
00748
00749 INLINE void TextNode::
00750 set_font(TextFont *font) {
00751 TextProperties::set_font(font);
00752 invalidate_with_measure();
00753 }
00754
00755
00756
00757
00758
00759
00760 INLINE void TextNode::
00761 clear_font() {
00762 TextProperties::clear_font();
00763 invalidate_with_measure();
00764 }
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787 INLINE void TextNode::
00788 set_small_caps(bool small_caps) {
00789 TextProperties::set_small_caps(small_caps);
00790 invalidate_with_measure();
00791 }
00792
00793
00794
00795
00796
00797
00798 INLINE void TextNode::
00799 clear_small_caps() {
00800 TextProperties::clear_small_caps();
00801 invalidate_with_measure();
00802 }
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812 INLINE void TextNode::
00813 set_small_caps_scale(PN_stdfloat small_caps_scale) {
00814 TextProperties::set_small_caps_scale(small_caps_scale);
00815 invalidate_with_measure();
00816 }
00817
00818
00819
00820
00821
00822
00823 INLINE void TextNode::
00824 clear_small_caps_scale() {
00825 TextProperties::clear_small_caps_scale();
00826 invalidate_with_measure();
00827 }
00828
00829
00830
00831
00832
00833
00834 INLINE void TextNode::
00835 set_slant(PN_stdfloat slant) {
00836 TextProperties::set_slant(slant);
00837 invalidate_with_measure();
00838 }
00839
00840
00841
00842
00843
00844
00845 INLINE void TextNode::
00846 clear_slant() {
00847 TextProperties::clear_slant();
00848 invalidate_with_measure();
00849 }
00850
00851
00852
00853
00854
00855
00856 INLINE void TextNode::
00857 set_align(TextNode::Alignment align_type) {
00858 TextProperties::set_align(align_type);
00859 invalidate_with_measure();
00860 }
00861
00862
00863
00864
00865
00866
00867 INLINE void TextNode::
00868 clear_align() {
00869 TextProperties::clear_align();
00870 invalidate_with_measure();
00871 }
00872
00873
00874
00875
00876
00877
00878
00879
00880 INLINE void TextNode::
00881 set_indent(PN_stdfloat indent) {
00882 TextProperties::set_indent(indent);
00883 invalidate_with_measure();
00884 }
00885
00886
00887
00888
00889
00890
00891 INLINE void TextNode::
00892 clear_indent() {
00893 TextProperties::clear_indent();
00894 invalidate_with_measure();
00895 }
00896
00897
00898
00899
00900
00901
00902
00903
00904 INLINE void TextNode::
00905 set_wordwrap(PN_stdfloat wordwrap) {
00906 TextProperties::set_wordwrap(wordwrap);
00907 invalidate_with_measure();
00908 }
00909
00910
00911
00912
00913
00914
00915
00916 INLINE void TextNode::
00917 clear_wordwrap() {
00918 TextProperties::clear_wordwrap();
00919 invalidate_with_measure();
00920 }
00921
00922
00923
00924
00925
00926
00927 INLINE void TextNode::
00928 set_text_color(const LColor &text_color) {
00929 TextProperties::set_text_color(text_color);
00930 invalidate_no_measure();
00931 }
00932
00933
00934
00935
00936
00937
00938 INLINE void TextNode::
00939 set_text_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
00940 set_text_color(LColor(r, g, b, a));
00941 }
00942
00943
00944
00945
00946
00947
00948
00949 INLINE void TextNode::
00950 clear_text_color() {
00951 TextProperties::clear_text_color();
00952 invalidate_no_measure();
00953 }
00954
00955
00956
00957
00958
00959
00960 INLINE void TextNode::
00961 set_shadow_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
00962 set_shadow_color(LColor(r, g, b, a));
00963 }
00964
00965
00966
00967
00968
00969
00970 INLINE void TextNode::
00971 set_shadow_color(const LColor &shadow_color) {
00972 TextProperties::set_shadow_color(shadow_color);
00973 invalidate_no_measure();
00974 }
00975
00976
00977
00978
00979
00980
00981 INLINE void TextNode::
00982 clear_shadow_color() {
00983 TextProperties::clear_shadow_color();
00984 invalidate_with_measure();
00985 }
00986
00987
00988
00989
00990
00991
00992
00993
00994 INLINE void TextNode::
00995 set_shadow(PN_stdfloat xoffset, PN_stdfloat yoffset) {
00996 set_shadow(LVecBase2(xoffset, yoffset));
00997 }
00998
00999
01000
01001
01002
01003
01004
01005
01006 INLINE void TextNode::
01007 set_shadow(const LVecBase2 &shadow_offset) {
01008 TextProperties::set_shadow(shadow_offset);
01009 invalidate_no_measure();
01010 }
01011
01012
01013
01014
01015
01016
01017
01018 INLINE void TextNode::
01019 clear_shadow() {
01020 TextProperties::clear_shadow();
01021 invalidate_no_measure();
01022 }
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037 INLINE void TextNode::
01038 set_bin(const string &bin) {
01039 TextProperties::set_bin(bin);
01040 invalidate_no_measure();
01041 }
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051 INLINE void TextNode::
01052 clear_bin() {
01053 TextProperties::clear_bin();
01054 invalidate_no_measure();
01055 }
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072 INLINE int TextNode::
01073 set_draw_order(int draw_order) {
01074 invalidate_no_measure();
01075 return TextProperties::set_draw_order(draw_order);
01076 }
01077
01078
01079
01080
01081
01082
01083 INLINE void TextNode::
01084 clear_draw_order() {
01085 TextProperties::clear_draw_order();
01086 invalidate_with_measure();
01087 }
01088
01089
01090
01091
01092
01093
01094
01095
01096 INLINE void TextNode::
01097 set_tab_width(PN_stdfloat tab_width) {
01098 TextProperties::set_tab_width(tab_width);
01099 invalidate_with_measure();
01100 }
01101
01102
01103
01104
01105
01106
01107 INLINE void TextNode::
01108 clear_tab_width() {
01109 TextProperties::clear_tab_width();
01110 invalidate_with_measure();
01111 }
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121 INLINE void TextNode::
01122 set_glyph_scale(PN_stdfloat glyph_scale) {
01123 TextProperties::set_glyph_scale(glyph_scale);
01124 invalidate_with_measure();
01125 }
01126
01127
01128
01129
01130
01131
01132 INLINE void TextNode::
01133 clear_glyph_scale() {
01134 TextProperties::clear_glyph_scale();
01135 invalidate_with_measure();
01136 }
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146 INLINE void TextNode::
01147 set_glyph_shift(PN_stdfloat glyph_shift) {
01148 TextProperties::set_glyph_shift(glyph_shift);
01149 invalidate_with_measure();
01150 }
01151
01152
01153
01154
01155
01156
01157 INLINE void TextNode::
01158 clear_glyph_shift() {
01159 TextProperties::clear_glyph_shift();
01160 invalidate_with_measure();
01161 }
01162
01163
01164
01165
01166
01167
01168
01169
01170 INLINE void TextNode::
01171 set_text(const string &text) {
01172 TextEncoder::set_text(text);
01173 invalidate_with_measure();
01174 }
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186 INLINE void TextNode::
01187 set_text(const string &text, TextNode::Encoding encoding) {
01188 TextEncoder::set_text(text, encoding);
01189 invalidate_with_measure();
01190 }
01191
01192
01193
01194
01195
01196
01197 INLINE void TextNode::
01198 clear_text() {
01199 TextEncoder::clear_text();
01200 invalidate_with_measure();
01201 }
01202
01203
01204
01205
01206
01207
01208
01209 INLINE void TextNode::
01210 append_text(const string &text) {
01211 TextEncoder::append_text(text);
01212 invalidate_with_measure();
01213 }
01214
01215
01216
01217
01218
01219
01220
01221
01222 INLINE void TextNode::
01223 append_unicode_char(wchar_t character) {
01224 TextEncoder::append_unicode_char(character);
01225 invalidate_with_measure();
01226 }
01227
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238 INLINE string TextNode::
01239 get_wordwrapped_text() const {
01240 return encode_wtext(get_wordwrapped_wtext());
01241 }
01242
01243
01244
01245
01246
01247
01248
01249
01250 INLINE PN_stdfloat TextNode::
01251 calc_width(const string &line) const {
01252 return calc_width(decode_text(line));
01253 }
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263 INLINE void TextNode::
01264 set_wtext(const wstring &wtext) {
01265 TextEncoder::set_wtext(wtext);
01266 invalidate_with_measure();
01267 }
01268
01269
01270
01271
01272
01273
01274
01275 INLINE void TextNode::
01276 append_wtext(const wstring &wtext) {
01277 TextEncoder::append_wtext(wtext);
01278 invalidate_with_measure();
01279 }
01280
01281
01282
01283
01284
01285
01286
01287
01288
01289
01290
01291 INLINE wstring TextNode::
01292 get_wordwrapped_wtext() const {
01293 check_measure();
01294 return _wordwrapped_wtext;
01295 }
01296
01297
01298
01299
01300
01301
01302
01303
01304 INLINE PN_stdfloat TextNode::
01305 get_left() const {
01306 check_measure();
01307 return _text_ul[0];
01308 }
01309
01310
01311
01312
01313
01314
01315
01316
01317 INLINE PN_stdfloat TextNode::
01318 get_right() const {
01319 check_measure();
01320 return _text_lr[0];
01321 }
01322
01323
01324
01325
01326
01327
01328
01329
01330 INLINE PN_stdfloat TextNode::
01331 get_bottom() const {
01332 check_measure();
01333 return _text_lr[1];
01334 }
01335
01336
01337
01338
01339
01340
01341
01342
01343 INLINE PN_stdfloat TextNode::
01344 get_top() const {
01345 check_measure();
01346 return _text_ul[1];
01347 }
01348
01349
01350
01351
01352
01353
01354
01355 INLINE PN_stdfloat TextNode::
01356 get_height() const {
01357 check_measure();
01358 return _text_ul[1] - _text_lr[1];
01359 }
01360
01361
01362
01363
01364
01365
01366
01367 INLINE PN_stdfloat TextNode::
01368 get_width() const {
01369 check_measure();
01370 return _text_lr[0] - _text_ul[0];
01371 }
01372
01373
01374
01375
01376
01377
01378
01379
01380 INLINE LPoint3 TextNode::
01381 get_upper_left_3d() const {
01382 check_measure();
01383 return _ul3d;
01384 }
01385
01386
01387
01388
01389
01390
01391
01392
01393 INLINE LPoint3 TextNode::
01394 get_lower_right_3d() const {
01395 check_measure();
01396 return _lr3d;
01397 }
01398
01399
01400
01401
01402
01403
01404
01405
01406 INLINE int TextNode::
01407 get_num_rows() const {
01408 check_measure();
01409 return _num_rows;
01410 }
01411
01412
01413
01414
01415
01416
01417
01418
01419
01420 INLINE void TextNode::
01421 update() {
01422 check_rebuild();
01423 }
01424
01425
01426
01427
01428
01429
01430
01431
01432
01433
01434 INLINE void TextNode::
01435 force_update() {
01436 invalidate_with_measure();
01437 check_rebuild();
01438 }
01439
01440
01441
01442
01443
01444
01445
01446
01447
01448
01449 INLINE void TextNode::
01450 invalidate_no_measure() {
01451 _flags |= F_needs_rebuild;
01452 }
01453
01454
01455
01456
01457
01458
01459
01460
01461
01462
01463 INLINE void TextNode::
01464 invalidate_with_measure() {
01465 _flags |= (F_needs_rebuild | F_needs_measure);
01466 mark_internal_bounds_stale();
01467 }
01468
01469
01470
01471
01472
01473
01474
01475
01476 INLINE void TextNode::
01477 check_rebuild() const {
01478 if ((_flags & F_needs_rebuild) != 0) {
01479 ((TextNode *)this)->do_rebuild();
01480 }
01481 }
01482
01483
01484
01485
01486
01487
01488
01489
01490 INLINE void TextNode::
01491 check_measure() const {
01492 if ((_flags & F_needs_measure) != 0) {
01493 ((TextNode *)this)->do_measure();
01494 }
01495 }