-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
51 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
stormfront/src/main/kotlin/warlockfe/warlock3/stormfront/protocol/elements/BHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
package warlockfe.warlock3.stormfront.protocol.elements | ||
|
||
import warlockfe.warlock3.core.text.WarlockStyle | ||
import warlockfe.warlock3.stormfront.protocol.* | ||
import warlockfe.warlock3.stormfront.protocol.BaseElementListener | ||
import warlockfe.warlock3.stormfront.protocol.StartElement | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontStyleEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontPopStyleEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontPushStyleEvent | ||
|
||
class BHandler : BaseElementListener() { | ||
override fun startElement(element: StartElement): StormfrontEvent { | ||
return StormfrontStyleEvent(WarlockStyle.Bold) | ||
return StormfrontPushStyleEvent(WarlockStyle.Bold) | ||
} | ||
|
||
override fun endElement(): StormfrontEvent { | ||
return StormfrontStyleEvent(null) | ||
return StormfrontPopStyleEvent | ||
} | ||
} |
7 changes: 4 additions & 3 deletions
7
stormfront/src/main/kotlin/warlockfe/warlock3/stormfront/protocol/elements/PopBoldHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package warlockfe.warlock3.stormfront.protocol.elements | ||
|
||
import warlockfe.warlock3.stormfront.protocol.* | ||
import warlockfe.warlock3.stormfront.protocol.BaseElementListener | ||
import warlockfe.warlock3.stormfront.protocol.StartElement | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontStyleEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontPopStyleEvent | ||
|
||
class PopBoldHandler : BaseElementListener() { | ||
override fun startElement(element: StartElement): StormfrontEvent { | ||
return StormfrontStyleEvent(null) | ||
return StormfrontPopStyleEvent | ||
} | ||
} |
12 changes: 7 additions & 5 deletions
12
stormfront/src/main/kotlin/warlockfe/warlock3/stormfront/protocol/elements/PresetHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
package warlockfe.warlock3.stormfront.protocol.elements | ||
|
||
import warlockfe.warlock3.core.text.WarlockStyle | ||
import warlockfe.warlock3.stormfront.protocol.* | ||
import warlockfe.warlock3.stormfront.protocol.BaseElementListener | ||
import warlockfe.warlock3.stormfront.protocol.StartElement | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontStyleEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontPopStyleEvent | ||
import warlockfe.warlock3.stormfront.protocol.StormfrontPushStyleEvent | ||
|
||
class PresetHandler : BaseElementListener() { | ||
override fun startElement(element: StartElement): StormfrontStyleEvent { | ||
override fun startElement(element: StartElement): StormfrontEvent { | ||
val style = element.attributes["id"]?.let { WarlockStyle(it) } | ||
return StormfrontStyleEvent(style) | ||
return StormfrontPushStyleEvent(style ?: WarlockStyle.Default) | ||
} | ||
|
||
override fun endElement(): StormfrontEvent { | ||
return StormfrontStyleEvent(null) | ||
return StormfrontPopStyleEvent | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters