Browse Source

Stylekonflikt behoben

Kolja Strohm 5 years ago
parent
commit
85570cccda
2 changed files with 7 additions and 7 deletions
  1. 3 3
      TextFeld.cpp
  2. 4 4
      TextFeld.h

+ 3 - 3
TextFeld.cpp

@@ -281,7 +281,7 @@ void TextFeld::doMausEreignis( MausEreignis & me, bool userRet ) // Maus Ereigni
 {
     if( !userRet )
         return;
-    if( hatStyleNicht( Style::Erlaubt ) )
+    if( hatStyleNicht( Style::Editierbar ) )
     {
         int rbr = 0;
         if( rahmen )
@@ -1211,7 +1211,7 @@ void TextFeld::doTastaturEreignis( TastaturEreignis & te )
     ++ref;
     if( tak( takParam, this, te ) )
     {
-        if( hatStyleNicht( Style::Erlaubt ) )
+        if( hatStyleNicht( Style::Editierbar ) )
         {
             --ref;
             if( !ref )
@@ -1473,7 +1473,7 @@ void TextFeld::render( Bild & zRObj ) // zeichenet nach zRObj
         int oldX = x;
         if( i < len &&tm->zCurrentRenderer() )
             tm->zCurrentRenderer()->renderChar( x, y, istSchreibbar( showChar ) ? showChar : text[ i ], zRObj, style.selected ? style.selectedColor : style.fontColor, style.underlined, style.selected, style.selectedBackcroundColor );
-        if( i == cpos && tickVal <= 0.5 && hatStyle( Style::Fokus ) && hatStyle( Style::Erlaubt ) && tm->zCurrentRenderer() )
+        if( i == cpos && tickVal <= 0.5 && hatStyle( Style::Fokus ) && hatStyle( Style::Editierbar ) && tm->zCurrentRenderer() )
             zRObj.drawLinieV( oldX, y, tm->zCurrentRenderer()->getZeilenHeight(), 0xFFFF5555 );
         if( tm->zCurrentRenderer() )
         {

+ 4 - 4
TextFeld.h

@@ -92,12 +92,12 @@ namespace Framework
             const static __int64 Mehrzeilig = 0x001000; // Wenn dieser Flag nicht gesetzt wird, werden alle Zeilenumbrüche automatisch aus dem Text entfernt
             const static __int64 HCenter = 0x002000; // Wenn dieser Flag gesetzt wird, wird der Text genau in der horizontaen Mitte des Feldes plaziert
             const static __int64 VCenter = 0x004000; // Wenn dieser Flag gesetzt wird, wird der Text genau in der vertikalen Mitte des Feldes plaziert
-            //const static __int64 Styled = 0x008000; // Wenn dieser Flag gesetzt wird, kann der Text verschiedene Styles haben
+            const static __int64 Editierbar = 0x2000000; // Wenn dieser Flag gesetzt wird, kann der Text durch den Nutzer bearbeitet werden
             
             const static __int64 Center = HCenter | VCenter; // Vereint die Flags HCenter und VCenter
-            const static __int64 TextFeld = Sichtbar | Erlaubt | Rahmen | Buffered | VCenter; // Vereint die Flags Sichtbar, Erlaubt, Rahmen, Buffered, VCenter
-            const static __int64 Text = Sichtbar | /*Styled |*/ Mehrzeilig; // Vereint die Flags Sichtbar, Mehrfarbig, Mehrzeilig
-            const static __int64 TextGebiet = Sichtbar | Erlaubt | Rahmen | Hintergrund | /*Styled |*/ Mehrzeilig | VScroll; // Vereint die Flags Sichtbar, Erlaubt, Rahmen, Hintergrund, Mehrzeilig, Mehrfarbig, VScroll
+            const static __int64 TextFeld = Sichtbar | Erlaubt | Rahmen | Buffered | VCenter | Editierbar; // Vereint die Flags Sichtbar, Erlaubt, Rahmen, Buffered, VCenter
+            const static __int64 Text = Sichtbar | Mehrzeilig; // Vereint die Flags Sichtbar, Mehrfarbig, Mehrzeilig
+            const static __int64 TextGebiet = Sichtbar | Erlaubt | Rahmen | Hintergrund | Editierbar | Mehrzeilig | VScroll; // Vereint die Flags Sichtbar, Erlaubt, Rahmen, Hintergrund, Mehrzeilig, Mehrfarbig, VScroll
             const static __int64 Scroll = VScroll | HScroll; // Vereint die Flags VScroll und HScroll
         };
     private: