console.cpp 741 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #if defined(Hiro_Console)
  2. @implementation CocoaConsole : NSScrollView
  3. -(id) initWith:(phoenix::Console&)consoleReference {
  4. if(self = [super initWithFrame:NSMakeRect(0, 0, 0, 0)]) {
  5. console = &consoleReference;
  6. }
  7. return self;
  8. }
  9. @end
  10. namespace hiro {
  11. void pConsole::print(string text) {
  12. }
  13. void pConsole::reset() {
  14. }
  15. void pConsole::setBackgroundColor(Color color) {
  16. }
  17. void pConsole::setForegroundColor(Color color) {
  18. }
  19. void pConsole::setPrompt(string prompt) {
  20. }
  21. void pConsole::constructor() {
  22. @autoreleasepool {
  23. cocoaView = cocoaConsole = [[CocoaConsole alloc] initWith:console];
  24. }
  25. }
  26. void pConsole::destructor() {
  27. @autoreleasepool {
  28. [cocoaView removeFromSuperview];
  29. [cocoaView release];
  30. }
  31. }
  32. }
  33. #endif